[solved] Apk fail to install


for those having the same issue, here is how i have managed to install my apk with a custom release certificate

1 - change to jdk 1.6 (uninstall other jre/jdk)

2 - recreate certificat with keytool

3 - recompile with netbeans

4 - uninstall application from android settings/applications… menu



i signed my apk and it was alligned by jme automaticaly

but application fails to install

catlog :

I/ActivityManager( 250): Starting: Intent { dat=file:///mnt/sdcard/download/MyGame-release-6.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras) } from pid 32427

I/AudioHardwareMSM7X30( 133): Routing audio to Speakerphone

I/AudioHardwareMSM7X30( 133): Change routing audio to speaker for xLOUD

E/AudioPolicyManagerBase( 133): unknown stream type

E/AudioPolicyManagerBase( 133): unknown stream type

E/AudioPolicyManagerBase( 133): unknown stream type

E/AudioPolicyManagerBase( 133): unknown stream type

D/CustomizationProvider( 6841): openFile – START uri=content://com.sonyericsson.provider.customization/settings/com.sonyericsson.textinput.uxp

I/CustomizationProvider( 6841): No configuration file: /system/etc/customization/settings/com/sonyericsson/textinput/uxp/custom_settings.xml

D/dalvikvm(32764): GC_EXPLICIT freed 14K, 49% free 2769K/5379K, external 743K/1036K, paused 126ms

W/ActivityManager( 250): No content provider found for:

I/ActivityManager( 250): Displayed com.android.packageinstaller/.InstallAppProgress: +305ms

D/PackageParser( 250): Scanning package: /data/app/vmdl1158895595.tmp

W/ActivityManager( 250): No content provider found for:

W/PackageParser( 250): Exception reading res/layout/main.xml in /data/app/vmdl1158895595.tmp

W/PackageParser( 250): java.lang.SecurityException: META-INF/RP-KSTOR.SF has invalid digest for nifty.nxs in /data/app/vmdl1158895595.tmp

W/PackageParser( 250): at java.util.jar.JarVerifier.invalidDigest(JarVerifier.java:130)

W/PackageParser( 250): at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:357)

W/PackageParser( 250): at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:265)

W/PackageParser( 250): at java.util.jar.JarFile.getInputStream(JarFile.java:389)

W/PackageParser( 250): at android.content.pm.PackageParser.loadCertificates(PackageParser.java:342)

W/PackageParser( 250): at android.content.pm.PackageParser.collectCertificates(PackageParser.java:513)

W/PackageParser( 250): at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:5830)

W/PackageParser( 250): at com.android.server.PackageManagerService.access$2200(PackageManagerService.java:141)

W/PackageParser( 250): at com.android.server.PackageManagerService$5.run(PackageManagerService.java:4594)

W/PackageParser( 250): at android.os.Handler.handleCallback(Handler.java:587)

W/PackageParser( 250): at android.os.Handler.dispatchMessage(Handler.java:92)

W/PackageParser( 250): at android.os.Looper.loop(Looper.java:130)

W/PackageParser( 250): at android.os.HandlerThread.run(HandlerThread.java:60)

E/PackageParser( 250): Package com.mycompany.mygame has no certificates at entry res/layout/main.xml; ignoring!

seems something is wrong with the certificate

i created it directly with keytool

keytool -genkey -v -keystore rompelstilchen-peroxyde-release.keystore -alias rp-kstor -keyalg RSA -keysize 2048 -validity 10000

[edit : i checked the manifest inside the apk, it seems all messed up, no more xml, but binary data in the file (???) ]

plz help :frowning:

anyone ?

i tryed to generate a new keystore with JDK 6 but same problem :frowning:

this is a simple testapp generated in jme4 environement

compiled and signed by a personal keystore

plz help, anybody had this issue ? :slight_smile:

i found this for those who have the same issue

obviously one can’t sign apk with jd7 (hmmm)