4

Problem

I'm trying to install and test a release version of my app directly on my device using cordova.

Though I signed the apk, cordova tries to install the unsigned version to the device. How can I test the release version via cordova?

Details

When running

cordova run --release --buildConfig="build.json"

I get the following result:

[...]

BUILD SUCCESSFUL

Total time: 15.086 secs
Built the following apk(s):
        C:/myProject/platforms/android/build/outputs/apk/android-release-unsigned.apk
        C:/myProject/platforms/android/build/outputs/apk/android-release.apk
Using apk: C:/myProject/platforms/android/build/outputs/apk/android-release-unsigned.apk
Error: Failed to install apk to device: pkg: /data/local/tmp/android-release-unsigned.apk

Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
Waog
  • 7,127
  • 5
  • 25
  • 37
  • What is your build engine ? ant or gradle ? anyway check this answer http://stackoverflow.com/q/4843212/1641556 – Elshan Jun 17 '16 at 09:17
  • I didn't specify that anywhere but my ``\platforms\android`` folder is filled with gradle files and folders. So I guess it's gradle is the default. How do I check it? – Waog Jun 17 '16 at 09:21
  • @devopsEMK I can't see how your link is helpful to my problem. The apk is signed correctly and I can upload it to Google Play without problems. – Waog Jun 17 '16 at 09:23
  • Please check this http://stackoverflow.com/q/2914105/1641556 – Elshan Jun 17 '16 at 09:26

1 Answers1

2

This issue has been fixed but it's not released yet.
You can try the development version of cordova-android for now:
cordova platform add https://github.com/apache/cordova-android

daserge
  • 1,512
  • 12
  • 18