无法阅读AndroidManiFest.xml Android项目

时间:2014-06-26 16:09:48

标签: android

我在尝试运行Android项目时遇到以下问题。任何人都可以建议一些问题的解决方案吗?

Zip: EOCD not found, /data/local/tmp/Scrumptious.apk is not zip
06-26 21:25:53.012: D/asset(21420): failed to open Zip archive '/data/local/tmp/Scrumptious.apk'
06-26 21:25:53.022: W/PackageParser(21420): Unable to read AndroidManifest.xml of /data/local/tmp/Scrumptious.apk
06-26 21:25:53.022: W/PackageParser(21420): java.io.FileNotFoundException: AndroidManifest.xml
06-26 21:25:53.022: W/PackageParser(21420):     at android.content.res.AssetManager.openXmlAssetNative(Native Method)
06-26 21:25:53.022: W/PackageParser(21420):     at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:488)
06-26 21:25:53.022: W/PackageParser(21420):     at android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:456)
06-26 21:25:53.022: W/PackageParser(21420):     at android.content.pm.PackageParser.parsePackageLite(PackageParser.java:780)
06-26 21:25:53.022: W/PackageParser(21420):     at com.android.defcontainer.DefaultContainerService$1.getMinimalPackageInfo(DefaultContainerService.java:175)
06-26 21:25:53.022: W/PackageParser(21420):     at com.android.internal.app.IMediaContainerService$Stub.onTransact(IMediaContainerService.java:110)
06-26 21:25:53.022: W/PackageParser(21420):     at android.os.Binder.execTransact(Binder.java:404)
06-26 21:25:53.022: W/PackageParser(21420):     at dalvik.system.NativeStart.run(Native Method)
06-26 21:25:53.022: W/DefContainer(21420): Failed to parse package

2 个答案:

答案 0 :(得分:3)

当当前安装的apk的签名不同时,您的apk似乎无效(无法解析程序包)。所以试着

  1. 卸载旧应用程序
  2. 重启Eclipse
  3. 重建项目
  4. 重新安装apk

答案 1 :(得分:0)

右键单击您的项目 - > Android工具 - >修复项目属性。取自developers page.

  

如果您看到有关AndroidManifest.xml的错误或与Android zip文件相关的一些问题,请右键单击该项目并选择Android Tools>修复项目属性。 (项目正在寻找库文件的错误位置,这将为您解决。)