Android 未签名应用程序无法安装在设备上
我的应用程序可以在模拟器上运行,并将其导出为未签名的应用程序。
在我的手机设置-->>应用程序-->>检查了未知来源。
我通过 USB 将 .apk 下载到手机存储中。
然后在文件管理器下,我发现存储了.apk并点击安装按钮并尝试安装,
但最后它说应用程序未安装。但为什么?怎么了?
我也尝试 ./adb install -r myapp.apk 但它说错误:找不到设备
My app able run on simulator and I export it as Unsigned App.
On my phone's Setting-->>Applications--->>Unknown sources checked.
I download the .apk into phone storage through USB.
Then under File Manager, I found that stored .apk and hit install button and it try to install,
But finally it says Application Not installed. but why? wht's wrong?
Also I try ./adb install -r myapp.apk but it said error:device not found
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我从未使用您的方法在设备上测试过应用程序...当我没有使用 USB 在我的设备上进行调试并且我只想将其安装在我的手机上时,我会执行以下操作:
通过 USB 或其他方法将该 .apk 移动到您的手机(我使用 dropbox)。
打开 .apk 并安装在您的手机上。
前面的答案都是正确的,必须签名。但是通过执行我的方法,它将使用您的调试密钥进行签名。
在将其发布到市场之前,您显然需要使用真正的密钥对其进行实际签名。
I have never tested an app on a device by using your method... When I am NOT debugging on my device using usb and I just want to install it on my phone, I do the following:
If you have run it on the emulator then there is an .apk file in the bin directory of your project.
Move that .apk to your phone via usb or another method (I use dropbox).
Open the .apk and install on your phone.
The previous answers are correct, it must be signed. But by doing my method it will be signed with your debug key.
You will obviously want to actually sign it with a real key before publishing it to the market.
所有应用程序都必须经过签名才能安装在模拟器或真实设备上,请查看官方开发指南 签署您的申请:
All applications must be signed in order to install on emulator or real device, check out the official dev guide signing your application:
具体来说,您如何将 APK 获取到设备?尝试
dab install
。此外,您还可以从 Android 浏览器安装 APK,方法是将其上传到任何 Web 服务器并导航到其 URL。在安装之前,您必须导出并使用调试证书进行签名。了解发布。
Specifically how are you getting the APK to the device? Try
dab install <path to APK>
. Also, you can install APKs from the Android browser by uploading it to any web server and navigating to its URL.You must export and sign with a debug certificate before installing. Read about publishing.
如果您使用的是
Eclipse
,则无需将应用程序导出为“未签名的 apk”。只需在手机上启用“允许未知来源”,然后右键单击项目并点击“运行方式”即可。未签名的 APK 是通过使用 Android SDK 中存储的
debug.keystore
密钥进行签名来生成的。他的密钥可能已损坏。为了验证,检查是否有其他项目也出现类似的问题。要解决密钥损坏问题,请删除 SDK 并重新安装(不应超过 15 分钟)。如果其他项目工作正常,这意味着您的
debug.keystore
密钥没有损坏,您需要卸载手机上此应用程序的任何早期版本并重新启动手机。adb 服务器
也可能出现混乱。在这种情况下,请重新启动Eclipse
或从命令行执行adb Kill-server
。另外,似乎其他人也遇到过类似的问题。您是否搜索过类似的
StackOverflow
问题并尝试过解决方案?这是一个:Android 上的“应用未安装”错误If you are using
Eclipse
, you don't need to export your app as "unsigned apk". Simply enable "Allow Unknown Sources" on the phone, and right click on project and hit "Run As".Unsigned apks are generated by signing them with the
debug.keystore
key that's stored in the Android SDK. It could be possible that his key is corrupted. To verify, check to see if any other project also gives a similar problem. To resolve th key corruption, delete your SDK and install again (shouldn't take more than 15mins).In case other projects work fine, which means your
debug.keystore
key is NOT corrupt, you need to uninstall any previous versions of this app on your phone and restart your phone.It could also be possible that the
adb server
could be messed up. In that case, restart yourEclipse
or doadb kill-server
from command line.Also, seems like other people have faced similar issues. Did you search similar
StackOverflow
questions and try out the solutions? Here's one: 'App not Installed' Error on Android未签名的APK可以安装在真实的移动设备中进行测试。
只需对图像执行以下步骤:
找到 APK 并通过 gmail 等将其发送到您的手机。
Unsigned APK can be installed in real mobile devices for purpose of testing.
Just follow these steps on images:
Locate the APK and send it to your mobile through gmail etc..