开发者

Unable to read AndroidManifest.xml

开发者 https://www.devze.com 2023-03-19 15:57 出处:网络
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

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 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 doing everything command line, and not using Eclipse. If I install my app via debug release, it works just fine.

Here is the output of ant ([[PASSWORD]] is my password, and MYALIAS is my alias). 'CApp' is the primary a开发者_开发知识库ctivity.

> D:\Development\Projects\Dash>ant release Buildfile:
> D:\Development\Projects\Dash\build.xml
>     [setup] Android SDK Tools Revision 11
>     [setup] Project Target: Android 2.1-update1
>     [setup] API level: 7
>     [setup]
>     [setup] ------------------
>     [setup] Resolving library dependencies:
>     [setup] No library dependencies.
>     [setup]
>     [setup] ------------------
>     [setup]
>     [setup]
>     [setup] Importing rules file: tools\ant\main_rules.xml
> 
> -set-release-mode:
>      [echo] *************************************************
>      [echo] ****  Android Manifest has debuggable=true   ****
>      [echo] **** Doing DEBUG packaging with RELEASE keys ****
>      [echo] *************************************************
> 
> -release-obfuscation-check:
> 
> -pre-build:
> 
> -dirs:
>      [echo] Creating output directories if needed...
>     [mkdir] Created dir: D:\Development\Projects\Dash\bin
>     [mkdir] Created dir: D:\Development\Projects\Dash\gen
>     [mkdir] Created dir: D:\Development\Projects\Dash\bin\classes
> 
> -aidl:
>      [echo] Compiling aidl files into Java classes...
> 
> -renderscript:
>      [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
> 
> -resource-src:
>      [echo] Generating R.java / Manifest.java from the resources...
> 
> -pre-compile:
> 
> compile:
>     [javac] D:\Development\Libraries\android-sdk-windows\tools\ant\main_rules.xml:384:
> warning: 'includeantruntime' was not set, defaulting to
> build.sysclasspat h=last; set to false for repeatable builds
>     [javac] Compiling 14 source files to D:\Development\Projects\Dash\bin\classes
> 
> -post-compile:
> 
> -obfuscate:
> 
> -dex:
>      [echo] Converting compiled files and external libraries into D:\Development\Projects\Dash\bin\classes.dex...
> 
> -package-resources:
>      [echo] Packaging resources
>      [aapt] Creating full resource package...  [aapt.exe] Warning: AndroidManifest.xml already defines debuggable (in
> http://schemas.android.com/apk/res/android); using existing value in
> manifest.
> 
> -package-release: [apkbuilder] Creating CApp-unsigned.apk for release...
> 
> -release-prompt-for-password:
>     [input] Please enter keystore password (store:1.keystore): [[PASSWORD]]
>     [input] Please enter password for alias 'MYALIAS': [[PASSWORD]]
> 
> -release-nosign:
> 
> release:
>      [echo] Signing final apk...   [signjar] Signing JAR: D:\Development\Projects\Dash\bin\CApp-unsigned.apk to
> D:\Development\Projects\Dash\bin\CApp-unaligned.apk as MYALIAS
>      [echo] Running zip align on final apk...
>      [echo] Release Package: D:\Development\Projects\Dash\bin\CApp-release.apk
> 
> BUILD SUCCESSFUL Total time: 16 seconds
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号