无法安装apk

时间:2013-11-25 09:31:35

标签: android android-manifest apk filenotfoundexception

我第一次尝试安装应用时,会说Check for errors in your project。第二次,它说:

 Installation failed due to invalid APK file!

[2013-11-25 09:10:44 - ScanCard]请查看logcat输出以获取更多详细信息。 [2013-11-25 09:10:44 - ScanCard]发布已取消!

我的logcat的输出是:

 AndroidRuntime(18391): CheckJNI is OFF
 dalvikvm(18391): Trying to load lib libjavacore.so 0x0
 dalvikvm(18391): Added shared lib libjavacore.so 0x0
 dalvikvm(18391): Trying to load lib libnativehelper.so 0x0
 dalvikvm(18391): Added shared lib libnativehelper.so 0x0
 AndroidRuntime(18391): Calling main entry com.android.commands.pm.Pm
 zipro(18324): Zip: EOCD not found, /data/local/tmp/ScanCard.apk is not zip
 asset(18324): failed to open Zip archive '/data/local/tmp/ScanCard.apk'
 PackageParser(18324): Unable to read AndroidManifest.xml of  /data/local/tmp/ScanCard.apk
 PackageParser(18324): java.io.FileNotFoundException: AndroidManifest.xml
 PackageParser(18324):  at    android.content.res.AssetManager.openXmlAssetNative(Native Method)
 PackageParser(18324):  at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:488)
 PackageParser(18324):  at android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:456)
 PackageParser(18324):  at android.content.pm.PackageParser.parsePackageLite(PackageParser.java:758)
 PackageParser(18324):  at com.android.defcontainer.DefaultContainerService$1.getMinimalPackageInfo(DefaultContainerService.java:173)
 PackageParser(18324):  at com.android.internal.app.IMediaContainerService$Stub.onTransact(IMediaContainerService.java:110)
 PackageParser(18324):  at android.os.Binder.execTransact(Binder.java:388)  
 PackageParser(18324):  at dalvik.system.NativeStart.run(Native Method)
 DefContainer(18324): Failed to parse package
 ActivityManager(380): No content provider found for permission revoke: file:///data/local/tmp/ScanCard.apk

我没有运行自定义ROM,我在Nexus上运行Jellybean 4.3库存。

编辑:

重启Eclipse修复了我的问题

1 个答案:

答案 0 :(得分:0)

您的清单文件或包含的.jar文件存在问题。您可以查看this threadthis answer,看看其中哪一项是您遇到问题的原因。