Android 如何解决由于APK文件无效导致安装失败?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12532044/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 10:54:24  来源:igfitidea点击:

How to solve Installation failed due to invalid APK file?

androideclipseapk

提问by neowinston

I'm trying to build Dolphin Player, but I got his error:

我正在尝试构建 Dolphin Player,但我收到了他的错误:

[2012-09-21 09:46:23 - DolphinPlayer] Installation failed due to invalid APK file!
[2012-09-21 09:46:23 - DolphinPlayer] Please check logcat output for more details.
[2012-09-21 09:46:23 - DolphinPlayer] Launch canceled!


09-21 09:32:15.460: W/PackageParser(52): Unknown element under <application>: intent-filter at /data/app/vmdl30455.tmp Binary XML file line #31
09-21 09:32:17.360: E/PackageManager(52): Package com.broov.player has mismatched uid: 10031 on disk, 10035 in settings
09-21 09:32:17.370: I/PackageManager(52): /data/app/vmdl30455.tmp changed; unpacking
09-21 09:32:17.390: W/PackageManager(52): Native ABI mismatch from package file
09-21 09:32:17.400: W/PackageManager(52): Package couldn't be installed in /data/app/com.broov.player.apk
09-21 09:32:17.460: D/AndroidRuntime(833): Shutting down VM
09-21 09:32:17.460: D/dalvikvm(833): DestroyJavaVM waiting for non-daemon threads to exit
09-21 09:32:17.460: D/dalvikvm(833): DestroyJavaVM shutting VM down
09-21 09:32:17.460: D/dalvikvm(833): HeapWorker thread shutting down
09-21 09:32:17.460: D/dalvikvm(833): HeapWorker thread has shut down
09-21 09:32:17.470: D/jdwp(833): JDWP shutting down net...
09-21 09:32:17.470: I/dalvikvm(833): Debugger has detached; object registry had 1 entries
09-21 09:32:17.480: D/dalvikvm(833): VM cleaning up
09-21 09:32:17.480: E/AndroidRuntime(833): ERROR: thread attach failed
09-21 09:32:17.490: D/dalvikvm(833): LinearAlloc 0x0 used 631172 of 5242880 (12%)
09-21 09:32:17.669: D/dalvikvm(52): GC freed 8681 objects / 526608 bytes in 239ms
: E/(): Device disconnected

采纳答案by bashu

May be two cases.

可能是两种情况。

  1. AndroidManifest.xml
  2. Included .jar file also may be the cause of this problem.
  1. AndroidManifest.xml
  2. 包含的 .jar 文件也可能是导致此问题的原因。

for more information take a look

欲了解更多信息,请查看

Eclipse installation failed due to invalid APK file?

由于 APK 文件无效,Eclipse 安装失败?

OR

或者

Installation failed due to invalid APK file?

由于 APK 文件无效,安装失败?

OR

或者

Installation failed due to invalid APK file! - Android

由于 APK 文件无效,安装失败!- 安卓

OR

或者

Installation failed - invalid apk file - android_opencv_library

安装失败 - 无效的 apk 文件 - android_opencv_library

回答by manavo

It looks like in your AndroidManifest.xml file something has gone wrong. An intent-filter in the wrong place maybe? I think it need to be within an <activity> tag, not within the <application> tag.

看起来您的 AndroidManifest.xml 文件中出了点问题。一个意图过滤器可能在错误的地方?我认为它需要在 <activity> 标签内,而不是在 <application> 标签内。

回答by Hanuman

I have same error when I am running the application then I deleted the bin folderand cleaned projectand run again, It is again created bin folder and run without any errors.

我在运行应用程序时遇到同样的错误,然后我删除了 bin 文件夹并清理了项目并再次运行,它再次创建了 bin 文件夹并运行而没有任何错误。

回答by Doilio Matsinhe

Build > Rebuild Project.. Fixed the issue for me

Build > Rebuild Project.. 为我解决了这个问题