Android 未签名应用程序无法安装在设备上

发布于 2025-01-08 08:10:06 字数 244 浏览 2 评论 0原文

我的应用程序可以在模拟器上运行,并将其导出为未签名的应用程序。

在我的手机设置-->>应用程序-->>检查了未知来源。

我通过 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

浪菊怪哟 2025-01-15 08:10:06

我从未使用您的方法在设备上测试过应用程序...当我没有使用 USB 在我的设备上进行调试并且我只想将其安装在我的手机上时,我会执行以下操作:

  1. < p>如果你在模拟器上运行了它,那么你的项目的 bin 目录中有一个 .apk 文件。

  2. 通过 USB 或其他方法将该 .apk 移动到您的手机(我使用 dropbox)。

  3. 打开 .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:

  1. If you have run it on the emulator then there is an .apk file in the bin directory of your project.

  2. Move that .apk to your phone via usb or another method (I use dropbox).

  3. 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.

不知在何时 2025-01-15 08:10:06

所有应用程序都必须经过签名才能安装在模拟器或真实设备上,请查看官方开发指南 签署您的申请

  • 所有申请都必须签名。系统不会安装
    模拟器或设备上的应用程序(如果未签名)。
  • 为了测试和调试您的应用程序,构建工具使用由 Android 创建的特殊调试密钥对您的应用程序进行签名
    SDK构建工具。

All applications must be signed in order to install on emulator or real device, check out the official dev guide signing your application:

  • All applications must be signed. The system will not install an
    application on an emulator or a device if it is not signed.
  • To test and debug your application, the build tools sign your application with a special debug key that is created by the Android
    SDK build tools.
肥爪爪 2025-01-15 08:10:06

具体来说,您如何将 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.

看轻我的陪伴 2025-01-15 08:10:06

如果您使用的是 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.keystorekey 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 your Eclipse or do adb 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

秋叶绚丽 2025-01-15 08:10:06

未签名的APK可以安装在真实的移动设备中进行测试。

只需对图像执行以下步骤:

在此处输入图像描述

在此处输入图像描述

找到 APK 并通过 gmail 等将其发送到您的手机。

Unsigned APK can be installed in real mobile devices for purpose of testing.

Just follow these steps on images:

enter image description here

enter image description here

Locate the APK and send it to your mobile through gmail etc..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文