Hi
I've just knocked together my first app, have released and signed it and transferred to my phone, but cannot get it to install on my phone - after going through the screen saying 'Do you want to install this application' and clicking install, I just get a message saying 'Application not installed' with no further explanation. I had checked the signing using jarsigner -verify
.
I have uploaded the .apk to http://ubuntuone.com/p/ESB/ and obtained the log using the LogCollector app on my phone. The relevant extract is reproduced below.
Log Collector version: 1.1.0
Device model: HTC Desire
Firmware version: 2.2
Kernel version: 2.6.32.15-gf9c0527
htc-kernel@and18-2 )
#1 PREEMPT Fri Jul 23 17:26:53 CST 2010
Build number: FRF91
08-31 10:18:21.289 I/ActivityManager( 93): Starting activity: Intent { act=android.intent.action.VIEW dat=file:///sdcard/blanket.apk typ=application/vnd.android.package-archive cmp=com.android.packageinstaller/.PackageInstallerActivity }
08-31 10:18:21.359 I/PackageParser(20453): uk.co.oketchup.blanketsquare: compat added android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_PHONE_STATE
08-31 10:18:21.379 D/skia (20453): --- decoder->decode returned false
08-31 10:18:21.669 I/ActivityManager( 93): Displayed activity com.android.packageinstaller/.PackageInstallerActivity: 331 ms (total 331 ms)
08-31 10:18:22.059 D/PowerManagerService( 93): New lightsensor value:640, lcdValue:192
08-31 10:18:22.390 D/SynchronizationService(20285): Checking preferences
08-31 10:18:22.769 I/ActivityManager( 93): Starting activity: Intent { dat=file:///sdcard/blanket.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras) }
08-31 10:18:22.849 D/skia (20453): --- decoder->decode returned false
08-31 10:18:22.999 D/dalvikvm(20459): GC_EXPLICIT freed 419 objects / 23968 bytes in 74ms
08-31 10:18:23.089 D/PackageParser( 93): Scanning package: /data/app/vmdl73677.tmp
08-31 10:18:23.099 I/PackageParser( 93): uk.co.oketchup.blanketsquare: compat added android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_PHONE_STATE
08-31 10:18:23.129 I/ActivityManager( 93): Displayed activity com.android.packageinstaller/.InstallAppProgress: 320 ms (total 320 ms)
08-31 10:18:23.139 W/PackageParser( 93): Exception reading res/layout/main.xml in /data/app/vmdl73677.tmp
08-31 10:18:23.139 W/PackageParser( 93): java.io.IOException
08-31 10:18:23.139 W/PackageParser( 93): at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:207)
08-31 10:18:23.139 W/PackageParser( 93): at java.util.zip.ZipFile$ZipInflaterInputStream.read(ZipFile.java:432)
08-31 10:18:23.139 W/PackageParser( 93): at java.io.FilterInputStream.read(FilterInputStream.java:130)
08-31 10:18:23.139 W/PackageParser( 93): at org.apache.harmony.luni.util.InputStreamHelper.readFullyAndClose(InputStreamHelper.java:174)
08-31 10:18:23.139 W/PackageParser( 93): at java.util.jar.JarFile.getManifest(JarFile.java:307)
08-31 10:18:23.139 W/PackageParser( 93): at java.util.jar.JarFile.getInputStream(JarFile.java:385)
08-31 10:18:23.139 W/PackageParser( 93): at android.content.pm.PackageParser.loadCertificates(PackageParser.java:338)
08-31 10:18:23.139 W/PackageParser( 93): at android.content.pm.PackageParser.collectCertificates(PackageParser.java:509)
08-31 10:18:23.139 W/PackageParser( 93): at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:5961)
08-31 10:18:23.139 W/PackageParser( 93): at com.android.server.PackageManagerService.access$2100(PackageManagerService.java:138)
08-31 10:18:23.139 W/PackageParser( 93): at com.android.server.PackageManagerService$5.run(PackageManagerService.java:4819)
08-31 10:18:23.139 W/PackageParser( 93): at android.os.Handler.handleCallback(Handler.java:587)
08-31 10:18:23.139 W/PackageParser( 93): at android.os.Handler.dispatchMessage(Handler.java:92)
08-31 10:18:23.139 W/PackageParser( 93): at android.os.Looper.loop(Looper.java:144)
08-31 10:18:23.139 W/PackageParser( 93): at android.os.HandlerThread.run(HandlerThread.java:60)
08-31 10:18:23.139 W/PackageParser( 93): Caused by: java.util.zip.DataFormatException: data error
08-31 10:18:23.139 W/PackageParser( 93): at java.util.zip.Inflater.inflateImpl(Native Method)
08-31 10:18:23.139 W/PackageParser( 93): at java.util.zip.Inflater.inflate(Inflater.java:255)
08-31 10:18:23.139 W/PackageParser( 93): at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:188)
08-31 10:18:23.139 W/PackageParser( 93): ... 14 more
08-31 10:18:23.149 E/PackageParser( 93): Package uk.co.oketchup.blanketsquare has no certificates at entry res/layout/main.xml; ignoring!
08-31 10:18:23.269 D/dalvikvm( 93): GC_EXPLICIT freed 5970 objects / 337960 bytes in 107ms
08-31 10:18:24.729 I/InstallAppProgress(20453): Finished installing uk.co.oketchup.blanketsquare
Many thanks for your help.
Edit 02/09/2010 I have modified the main.xml file again by removing pretty much all the whitespace. It still does not install but is not quite the same error: it's claiming there is a zip file error although I notice that certificates do appear further down the list. If this is not something I'm obviously doing wrong, would it be better if I raised on android developers mailing list?
09-02 17:33:32.819 W/PackageParser( 93): Exception reading /data/app/vmdl73692.tmp
09-02 17:33:32.819 W/PackageParser( 93): java.io.IOException
09-02 17:33:32.819 W/PackageParser( 93): at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:207)
09-02 17:33:32.819 W/PackageParser( 93): at java.util.zip.ZipFile$ZipInflaterInputStream.read(ZipFile.java:432)
09-02 17:33:32.819 W/PackageParser( 93): at java.io.FilterInputStream.read(FilterInputStream.java:130)
09-02 17:33:32.819 W/PackageParser( 93): at org.apache.harmony.luni.util.InputStreamHelper.readFullyAndClose(InputStreamHelper.java:174)
09-02 17:33:32.819 W/PackageParser( 93): at java.util.jar.JarFile.readMetaEntries(JarFile.java:360)
09-02 17:33:32.819 W/PackageParser( 93): at java.util.jar.JarFile.<init>(JarFile.java:237)
09-02 17:33:32.819 W/PackageParser( 93): at java.util.jar.JarFile.<init>(JarFile.java:218)
09-02 17:33:32.819 W/PackageParser( 93): at android.content.pm.PackageParser.collectCertificates(PackageParser.java:471)
09-02 17:33:32.819 W/PackageParser( 93): at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:5961)
09-02 17:33:32.819 W/PackageParser( 93): at com.android.server.PackageManagerService.access$2100(PackageManagerService.java:138)
09-02 17:33:32.819 W/PackageParser( 93): at com.android.server.PackageManagerService$5.run(PackageManagerService.java:4819)
09-02 17:33:32.819 W/PackageParser( 93): at android.os.Handler.handleCallback(Handler.java:587)
09-02 17:33:32.819 W/PackageParser( 93): at android.os.Handler.dispatchMessage(Handler.java:92)
09-02 17:33:32.819 W/PackageParser( 93): at android.os.Looper.loop(Looper.java:144)
09-02 17:33:32.819 W/PackageParser( 93): at android.os.HandlerThread.run(HandlerThread.java:60)
09-02 17:33:32.819 W/PackageParser( 93): Caused by: java.util.zip.DataFormatException: data error
09-02 17:33:32.819 W/PackageParser( 93): at java.util.zip.Inflater.inflateImpl(Native Method)
09-02 17:33:32.819 W/PackageParser( 93): at java.util.zip.Inflater.inflate(Inflater.java:255)
09-02 17:33:32.819 W/PackageParser( 93): at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:188)
09-02 17:33:32.819 W/PackageParser( 93): ... 14 more