I can install the debug assembly on the emulator:
ant debug install
but I can not install the release build. My steps:
1. ant release 2. jarsigner -verbose -keystore ..\my-release-key.keystore bin\myapp-release-unsigned.apk mykey 3. ren bin\myapp-release-unsigned.apk bin\myapp-release-signed.apk 4. zipalign -v 4 myapp-release-signed.apk myapp-release.apk 5. adb install bin\myapp-release.apk
All steps are successful, except for the last one where I get the message:
82 KB/s (388012 bytes in 4.613s) pkg: /data/local/tmp/myapp-release.apk Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]
I also tried to do ant installr
instead of adb install bin\myapp-release.apk
with the same result
EDIT: I think this is related to the key, as this is the only difference that I see between release builds and debugging. I generated a key using:
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
as stated at http://developer.android.com/guide/publishing/app-signing.html . I changed the ant.properties
file to http://developer.android.com/guide/developing/building/building-cmdline.html and now I'm just doing ant release install
(instead of the steps above), but still facing the same problem . If someone knows how to ant generate a debug key, I could follow the same procedure to generate my release key and see if this solves the problem.
morpheus
source share