Reputation: 73
I'm trying to build / deploy and debug by pressing F5 on my Cordova Tools javascript project with a variety of android targets but the apk does not want to deploy.
It appears that the build completes and deploys successfully and the ADB console windows appears but remains blank. No app is deployed to a device or emulator.
Have tried Nexus 5, Samsung Galaxy Tab 2 and various emulators. All devices have been used as debug targets before
The thing that has changed is that I recently formatted my laptop and moved to Windows 10 Enterprise
I'm using a fresh installation of Visual Studio 2015 Enterprise
I can debug OK on Windows Phone 8.1, Windows 10
If I try and deploy the APK created from the console with ADB:
adb install android-debug.apk
I get
3715 KB/s (1141677 bytes in 0.300s) pkg: /data/local/tmp/android-debug-unaligned.apk Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
I haven't tinkered with the APK it is as it was built from VS
I have tried clearing the cache, checking the dependencies (both in Options) and checked for updates.
Any suggestions on how to move forward?
Thanks
Upvotes: 2
Views: 679
Reputation: 73
Solved. Turns out the config.xml settings were incorrect. Config.xml > Common > Package name needs to be in reverse domain name notation for android to deploy to the device.
I hadn't noticed this however because I had only been using the Cordova Tools project to compile for Windows 8.1 / 10 devices and in these build configurations the package naming convention is not enforced
This caused the problem:
Package name: mycompany.myappname
This fixed the problem:
Package name: com.mycompany.myappname
Upvotes: 2
Reputation: 312
Try in the command line/terminal, navigate to the root of your project folder, and enter "cordova platform remove android.” Then, rebuild the solution again (which will generate platform/android from a clean state)
Upvotes: 1