App fails to install in debug mode on android
See original GitHub issueDid you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?
Yes.
Tell us about the problem
My app fails to install on my device on tns run android
. iOS debugging works perfectly.
Which platform(s) does your issue occur on?
Android only.
Please provide the following version numbers that your issue occurs with:
- CLI: v3.4.0
- Cross-platform modules: v3.4.0
- Runtime(s): tns-android v3.4.0
Please tell us how to recreate the issue in as much detail as possible.
tns run android
Output:
Running full build
The project successfully built.
Installing...
Unable to apply changes on device: e0c6dec1. Error is: The parser did not find any certificates in the .apk..
[NSDebugAdapter] The tns command finished its execution with code 0.
Additional details
This was working fine with v3.2 (or v3.3) of CLI and Android. The only changes since then was updating to the latest version of NS, as well as an Android OS update (now v7.0) on my testing device. When the <app_name>-debug.apk file is transferred to my device and installed manually, the installation is successful and it works normally.
The apk debug certificates are less than 365 days old.
Further (empirically), the installation is successful on the first attempt after a phone restart (after uninstallation), but live sync stops working (with above error) after about 10 iterations.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Can't install debug version of my android application
I wrote an android application in IDEA. When I used Debug-mode (connected to my device) - everything worked nice.
Read more >Debug your app - Android Developers
Android Studio provides a debugger that allows you to do the following and more: Select a device to debug your app on. Set...
Read more >app fails in debug mode | B4X Programming Forum
Hi, since today, all my apps did not run in "debug mode". In "release mode" everything works fine. I use B4A V11.00.
Read more >Debug app installs and updates - Google Developers
The example log below shows a device that failed to sync with the latest managed Play policy because it wasn't connected to the...
Read more >Android USB Debugging on Windows 10
Enable USB debugging on your Android phone · Install Java SE SDK 8 update 152 · Configure Android SDK · Configure Google Chrome...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @karthiksbhat,
I’m also suspecting it’s some local setup. But this kind of problems are very hard to investigate and to figure out.
My suggestion is to update to latest versions of
nativescript
andandroid
which will be released this week and check if the error is still reproduced.Hey @Fatme , I have managed to solve the issue for me. It looks like its because I had performed little clean up of the folders in the application in order to try and solve another issue I was having, and in the process had deleted the “hooks” folder. Deleting the hooks folder is something I do religiously when jumping between different version of my application, however this time for whatever reason the hooks folder had not generated.
I didn notice that the
tns prepare android
command was silently failing (some typescript errors) which could be why it was not not creating the “hooks” folder. After spotting the typescript error and running tns prepare again, the hooks folder came back and the error went away.