NativeScript and Android troubleshooting.
During development Android application I'm faced with a millions various troubles, this is only a small list of them, only if I have time to descripted them.
1. NS Demo example can not started.
I simple create new NS project and try to start it.
# ns create myProject --ng # ns clean # npm i
But project failed despite I have last version of all related software.
Solution is non-obvious - need to change Angular ngZone from 13 to 12 - https://angular.io/api/core/NgZone.
2. Platform tools don't working
In my Windows developer environment there are nothing any trouble with Platform-tools.
But in my Linux environment I have simple trouble. Its look strange, because all my old project working fine, and Android Studio don't require any updates, therefore I don't understand instantly what happens. But in reality this is complex trouble, because Android studio change directory with platform tools and JAVA is outdated.
So, I have update Android tools, but it still don't working.
Need to update JAVA.
Important point of OpenSuse is 3 place where we can set up JAVA_HOME variable.
This is main place.
And two this updates is solution to make Android tools workable.
4. NS build errors: "build failed with exception"
Usually unresolved, you can try to upgrade NS
5. NS Runtime errors: com.tns.NativeScriptException: Failed to find module: "@nativescript/xxxxxxxxx", relative to: app/tns_modules.
Unresolved, but in some case you can import only parts of module:
6. Analyze device log with Adb.
Adb log is cool way to search troubles (if application can not started)
7. Difference between debug and release version.
Debug version usually never crashed if NS version is workable and can build at all, because needed version adding by webpack on demand. In release version you need to add needed packages manually.
See more details about this trouble in topics Prepare Nativescript bundle to publishing Google Play console (debug/release troubles).
8. Connect socket inspector.
Connection to socket inspector is cool way to debug application in Runtime (if application can started):
# devtools://devtools/bundled/inspector.html?ws=localhost:40000
9. Use Android studio as Android device File Inspector, as process killer in order to restart Android VM, and use Wipe as restart device emulator.
Related page:
- (2024) NativeScript Mosaic
- (2023) NativeScript and Android troubleshooting.
- (2024) NativeScript and Angular form
- (2024) NativeScript Drawer for Android/IOS phone (clear Angular project)
- (2023) Magic deployment Android application with NS Preview.
- (2022) Up and running Angular application on Android mobile phone with NativeScript.
- (2022) My NativeScript learning conspectus.
- (2019) Android books
- (2021) Android Masterclass lecture from Paulo Dictone
- (2020) My Android Handbook
- (2020) Kotlin Syntax
- (2021) How to debug Android frontend
- (2022) Android ADB
- (2019) Android Studio Requirements (vmx|sse|svm CPU flags)
- (2020) Up and running Android studio
- (2021) How to build application server based on push notification from Firebase
- (2021) Retrofit test with interceptor, clear communication and show data to TextView
- (2020) https://developers.google.com/admob/android/quick-start
- (2024) Google Cloud and Cloudflare
- (2023) CloudflareWorker and Supabase
- (2022) JS, Css
- (2022) Typescript, Webpack
- (2022) Angular, RxJs, Firebase, MongoDb
- (2022) Node, NestJs, Electron, Pwa, Telegram
- (2022) React, Redux, GraphQL, NextJs
- (2022) Angular/Typescript, JS books
<SITEMAP> <MVC> <ASP> <NET> <DATA> <KIOSK> <FLEX> <SQL> <NOTES> <LINUX> <MONO> <FREEWARE> <DOCS> <ENG> <CHAT ME> <ABOUT ME> < THANKS ME> |