I have finished up an Android app and I am attempting to sign it now in release mode. I have generated a keystore, and have updated my built properties to check the appropriate keystore file and alias. Everything compiles just fine, and I am presented with a nice apk file. However, when I attempt to install this on a mobile device via a URL I receive a 'Unable to read AndroidManifest.xml' error. According to the Android docs, providing the keystore / alias via the build properties will automatically sign and align the final apk file.
If I rename the apk file to a zip, I can indeed see everything is there. I am unsure of what steps to take to solve this issue. I am trying to do everything command line, and not use Eclipse. Here is the output of ant ([[PASSWORD]] is my password, and MYALIAS is my alias). 'CApp' is the primary activity. http://pastebin.com/PvTxMJrs I did notice I had debug on (line 58). I have since taken that off and it still does the same thing. I also tried to use Eclipse, which reports that everything exports OK. But I still get the same error. (I tried reusing the same keystore, and making a new one). Things I have tried: - Lowering the SDK version - Adding the mimetype to my server (AddType application/ vnd.android.package-archive .apk) - Tested on an emulator, and 2 Android Phones - Confirming Untrusted Sources is turned on To further add to the mystery, if I use 'adb install' it works just fine. Here's what logcat shows: W/zipro ( 278): Missed a central dir sig (at 0) D/asset ( 278): failed to open Zip archive '/sdcard/download/CApp- release.apk' W/PackageParser( 278): Unable to read AndroidManifest.xml of /sdcard/ download/CApp-release.apk W/PackageParser( 278): java.io.FileNotFoundException: AndroidManifest.xml W/PackageParser( 278): at android.content.res.AssetManager.openXmlAssetNative(Native Method) W/PackageParser( 278): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java: 469) W/PackageParser( 278): at android.content.res.AssetManager.openXmlResourceParser(AssetManager.java: 437) W/PackageParser( 278): at android.content.pm.PackageParser.parsePackage(PackageParser.java:370) W/PackageParser( 278): at com.android.packageinstaller.PackageUtil.getPackageInfo(PackageUtil.java: 79) W/PackageParser( 278): at com.android.packageinstaller.PackageInstallerActivity.onCreate(PackageInstallerActivity.java: 291) W/PackageParser( 278): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) W/PackageParser( 278): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2459) W/PackageParser( 278): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2512) W/PackageParser( 278): at android.app.ActivityThread.access $2200(ActivityThread.java:119) W/PackageParser( 278): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1863) W/PackageParser( 278): at android.os.Handler.dispatchMessage(Handler.java:99) W/PackageParser( 278): at android.os.Looper.loop(Looper.java: 123) W/PackageParser( 278): at android.app.ActivityThread.main(ActivityThread.java:4363) W/PackageParser( 278): at java.lang.reflect.Method.invokeNative(Native Method) W/PackageParser( 278): at java.lang.reflect.Method.invoke(Method.java:521) W/PackageParser( 278): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) W/PackageParser( 278): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) W/PackageParser( 278): at dalvik.system.NativeStart.main(Native Method) W/PackageInstaller( 278): Parse error when parsing manifest. Discontinuing installation I/ActivityManager( 64): Displayed activity com.android.packageinstaller/.PackageInstallerActivity: 620 ms (total 620 ms) -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

