Android:无法在平板电脑上安装我自己的 apk,但可以在 eclipse 中工作(也可以通过 eclipse 安装)
我创建了自己的应用程序。它在模拟器中运行,我可以将其导出为未签名的 apk,如果我通过 eclipse 启动/安装它,它也会在我的平板电脑上运行。
但是,如果我将 apk 放在平板电脑上并尝试在没有 eclipse 的情况下安装它,我会收到一条通知(应用程序未安装)。 我研究过 LogCat ( http://pastebin.com/fsSCzr5t )。我猜问题出在第151行。 我重构了 main.xml 但没有任何改变。
有什么提示吗?
谢谢B770
I've created my own app. It's running in the emulator, I can export it as unsigned apk and it's also running on my tablet if I start/install it through eclipse.
But if I put the apk on the tablet and try to install it without eclipse I got a notification (app not installed).
I've looked into LogCat ( http://pastebin.com/fsSCzr5t ). I guess the problem is in line 151.
I refactored the main.xml but nothing changed.
Any hints?
thx B770
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以尝试 http://code.google.com/p/android/ issues/detail?id=830(评论 26)。
或者也许您使用的是 JDK 7 而不是 6?请注意,您必须仅使用 JDK 6 开发 Android 应用程序。
You might try http://code.google.com/p/android/issues/detail?id=830 (comment 26).
Or maybe you are using JDK 7 instead of 6? Please mind that you have to develop android apps with JDK 6 only.
同样的情况也发生在我身上。只能从 bin 文件夹安装 APK。也许android工具使用的是jre7而不是6...我有jre和jdk 6 x86和x64,以及jre7x86,我不确定jre正在使用android工具。将尝试卸载 jre7 然后回到这里。
不.. jre7 不是问题...问题只是 APK 必须被签名,显然 Eclipse 使用调试签名,仅此而已,只需快速签名即可完成:3
Same happen to me. Only can install APK from bin folder. Maybe android tool is using jre7 instead of 6... I have jre and jdk 6 x86 and x64, and jre7x86 and im not sure what jre is using the android tool. Will try uninstall jre7 and come back here.
Nope.. jre7 wasnt the problem... the problem is just the APK must be singed, apparently eclipse use a debug sing and that's all, just sign fast and you are done :3
我刚刚遇到了同样的问题。解决方案是将您的应用程序导出为
签名的 apk
。否则您的设备将不允许您安装它。如果您使用 Eclipse 和 Android 插件,一旦您开始将其导出为签名 apk,它会要求您提供密钥库。但是,如果您愿意,它可以让您随时随地创建一个,所以这并不是一件很痛苦的事情。
完成签名导出后,您可以将其安装在您的设备上。
I just got the same problem. The solution is to export your application as a
signed apk
. Otherwise your device would not let you install it.If you use
Eclipse
and theAndroid
plugin, once you start exporting it as asigned apk
, it will ask you for a keystore. However, it will let you create one on the go if you want to so it's not much of a pain.Once you finished the signed export, you can install it on your device.
我刚刚遇到了这个问题..找到它是相当困难的。
将您的应用程序图标图片复制到所有文件夹drawable-hdpi、ldpi、mdpi、xhdpi、xxhdpi。这对我有帮助。
我没有尝试哪些是强制性的,哪些不是。有人可以尝试升级我的评论。
I´ve just had this problem .. It was quite problem to find it out.
Copy your app icon picture to all folders drawable-hdpi, ldpi, mdpi, xhdpi, xxhdpi. This helped me.
I didnt try which ones are mandatory and which not. Someone can try and upgrade my comment.
我遇到了这个问题。我的 Eclipse Workbench 名称中有一个空格。我从 Eclipse Workbench 中删除了空间(从“My Workbench”更改为“MyWorkbench”),然后生成了我的 APK 并能够安装。 :-|
I had this problem. I had a space in the name of my Eclipse Workbench. I removed the space from my Eclipse Workbench (changed from "My Workbench" to "MyWorkbench"), then generated my APK and was able to install. :-|