权限被拒绝引起"由于安装失败无效APK文件"被拒、权限、文件、QUOT

2023-09-05 09:51:33 作者:花亦敗°心亦凉

当我尝试在我的Nexus 4运行4.2.1运行我的应用程序,我一直在Eclipse中收到此错误:

When I try to run my app on my Nexus 4 running 4.2.1, I kept on getting this error in eclipse:

[2012-12-22 19:30:51 - Rhiokai] Installation failed due to invalid APK file!
[2012-12-22 19:30:51 - Rhiokai] Please check logcat output for more details.
[2012-12-22 19:30:51 - Rhiokai] Launch canceled!

我累推,并通过亚行安装,但它也不能工作。我想通了,这是因为在logcat中此消息的:

I tired pushing and installing via adb but it didn't work either. I figured out that it was because of this message in Logcat:

12-22 19:37:29.326: W/zipro(7371): Unable to open zip '/data/local/tmp/Rhiokai.apk': Permission denied
12-22 19:37:29.326: D/asset(7371): failed to open Zip archive '/data/local/tmp/Rhiokai.apk'

在如何解决这个问题的任何想法?

Any ideas on how to fix this issue?

推荐答案

如果您已经有设备使用相同的包名的应用程序的签名版本,则可能需要重新安装之前卸载它(除非你要再次签字,然后上传签署应用程序的设备)。

If you already have a signed version of the application on the device with the same package name, you might need to uninstall it before re-installing it (unless you want to sign it again and then upload that signed app to the device).