简体   繁体   English

未签名的Android APK文件将无法安装

[英]Unsigned Android apk file won't install

I created an unsigned APK file from my eclipse project to demo my app on another device. 我从eclipse项目创建了一个未签名的APK文件,以在另一台设备上演示我的应用程序。 It runs fine on the emulator and on a connected phone. 它可以在模拟器和连接的电话上正常运行。 When I emailed it and downloaded the apk file ( I have allow apps from unknown locations ticked on ) but the install fails with message. 当我通过电子邮件发送并下载apk文件时(我允许来自未知位置的应用程序被打勾),但是安装失败并显示消息。 "Installation failed" and not much more info. “安装失败”,并且没有更多信息。 Any ideas what I can check? 有什么我可以检查的想法吗?

Make sure that the os version of phone on which you trying to install the app is meet the minSdkVersion that you declared in your manifest file. 确保尝试安装该应用程序的手机的操作系统版本符合清单文件中声明的minSdkVersion。 Or if that app is already installed then unistall that and install again. 或者,如果该应用程序已经安装,请取消安装并重新安装。 May be it works. 可能是可行的。

I had the same problem. 我有同样的问题。 It was solved by uninstalling the version I had installed via usb from Eclipse. 通过从Eclipse卸载通过USB安装的版本可以解决此问题。 Once that version was off my phone I could email myself APK's and they would load fine. 一旦该版本退出我的手机,我就可以通过电子邮件向自己发送APK的电子邮件了,这样可以很好地加载。

All your apps need to be signed. 您的所有应用都需要签名。 Read here: 在这里阅读:

http://developer.android.com/tools/publishing/app-signing.html http://developer.android.com/tools/publishing/app-signing.html

Sign it with something like jarsigner 用jarsigner之类的东西签名

On the device, go to Settings->Applications->Unknown Sources and make sure that is ticked. 在设备上,转到“设置”->“应用程序”->“未知来源”,并确保已勾选。

Make sure that there is enough space on the phone, and that the phone is running on the right version of Android. 确保手机上有足够的空间,并且手机在正确版本的Android上运行。

Finally, if this still doesn't work, then sign your .apk file. 最后,如果仍然无法解决问题,请对.apk文件签名。

I had the same problem and in the end just signed apks which let them install perfectly. 我遇到了同样的问题,最后只签名了apk,让他们可以完美安装。 Alternatively if you use something like astro of the play store to backup your apk from the phone running it and send it over to the other phone - this also works. 另外,如果您使用Play商店的astro等工具从运行它的手机中备份apk并将其发送到另一部手机-这也可以。 I think it might not be packed right or for some reason it requires a signature to install. 我认为它可能未正确打包,或者由于某些原因需要安装签名。 It could also be that conflicting signatures are found on the new phone. 也可能是在新手机上发现了冲突的签名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM