我无法从eclipse安装apk

时间:2013-05-30 13:34:38

标签: android eclipse android-manifest apk

我已经在一台带有Windows 8的新计算机上安装了eclipse,我从旧PC上复制工作区,现在我可以打开项目并正常使用它们,但是当我尝试在设备中安装apk时或者在模拟器中,控制台中出现错误:

由于APK文件无效,

安装失败! 请检查logcat输出以获取更多详细信息。 发布已取消!

这是logcat:

> 05-30 13:11:54.054: W/PackageParser(3644): Unable to read AndroidManifest.xml of /data/local/tmp/J i A.apk
05-30 13:11:54.054: W/PackageParser(3644): java.io.FileNotFoundException: AndroidManifest.xml
05-30 13:11:54.054: W/PackageParser(3644):  at android.content.res.AssetManager.openXmlAssetNative(Native Method)
05-30 13:11:54.054: W/PackageParser(3644):  at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:487)
05-30 13:11:54.054: W/PackageParser(3644):  at android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:455)
05-30 13:11:54.054: W/PackageParser(3644):  at android.content.pm.PackageParser.parsePackageLite(PackageParser.java:649)
05-30 13:11:54.054: W/PackageParser(3644):  at com.android.defcontainer.DefaultContainerService$1.getMinimalPackageInfo(DefaultContainerService.java:144)
05-30 13:11:54.054: W/PackageParser(3644):  at com.android.internal.app.IMediaContainerService$Stub.onTransact(IMediaContainerService.java:102)
05-30 13:11:54.054: W/PackageParser(3644):  at android.os.Binder.execTransact(Binder.java:338)
05-30 13:11:54.054: W/PackageParser(3644):  at dalvik.system.NativeStart.run(Native Method)
05-30 13:11:54.054: W/DefContainer(3644): Failed to parse package
05-30 13:11:54.062: I/ApplicationPolicy(187): isApplicationInstallationEnabled
05-30 13:11:54.062: W/PackageManager(187): verifying app can be installed or not
05-30 13:11:54.062: W/PackageParser(3644): Unable to read AndroidManifest.xml of /data/local/tmp/J i A.apk
05-30 13:11:54.062: W/PackageParser(3644): java.io.FileNotFoundException: AndroidManifest.xml
05-30 13:11:54.062: W/PackageParser(3644):  at android.content.res.AssetManager.openXmlAssetNative(Native Method)
05-30 13:11:54.062: W/PackageParser(3644):  at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:487)
05-30 13:11:54.062: W/PackageParser(3644):  at android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:455)
05-30 13:11:54.062: W/PackageParser(3644):  at android.content.pm.PackageParser.parsePackageLite(PackageParser.java:649)
05-30 13:11:54.062: W/PackageParser(3644):  at com.android.defcontainer.DefaultContainerService$1.getMinimalPackageInfo(DefaultContainerService.java:144)
05-30 13:11:54.062: W/PackageParser(3644):  at com.android.internal.app.IMediaContainerService$Stub.onTransact(IMediaContainerService.java:102)
05-30 13:11:54.062: W/PackageParser(3644):  at android.os.Binder.execTransact(Binder.java:338)
05-30 13:11:54.062: W/PackageParser(3644):  at dalvik.system.NativeStart.run(Native Method)
05-30 13:11:54.062: W/DefContainer(3644): Failed to parse package
05-30 13:11:54.062: W/ActivityManager(187): No content provider found for permission revoke: file:///data/local/tmp/J i A.apk

如果我尝试导出应用程序以生成apk文件,则会出现一个“无法导出应用程序”的对话框。

有什么想法解决这个问题吗?我无论如何都无法测试我的应用程序或生成apk。

1 个答案:

答案 0 :(得分:0)

检查Android应用的目标SDK,并确保已安装该SDK版本。您可以在项目属性中更改它。