无法通过Eclipse在Android设备上安装APK

发布于 2024-12-22 17:44:44 字数 638 浏览 3 评论 0原文

不久前,我开始使用 Phonegap 和 Eclipse 以及 Android 2.3.3 SDK 开发一个小型 Android 应用程序。我在我的 HTC Sensation 上运行了我的构建,一切顺利。今天,我决定对我的手机进行 root 并安装 ICS rom,效果很好(如果有的话,可以是 Android Revolution 5.0.2)。我下载了 4.0 和 4.0.3 SDK 以及更新的 ADT,但我似乎无法再为我的设备构建。 LogCat 给我以下警告:

12-26 18:12:24.251: W/asset(17419): Asset path /data/local/tmp/myapp.apk is neither a directory nor file (type=0).
12-26 18:12:24.251: W/DefContainer(17419): Failed to parse package
12-26 18:12:24.251: W/ActivityManager(11546): No content provider found for permission revoke: file:///data/local/tmp/myapp.apk

事实上,我可以在设备上看到 /data,但看不到 /data/local/。有人遇到过类似的情况吗?

I started working on a small Android app using Phonegap and Eclipse a while ago with the Android 2.3.3 SDK. I ran my builds on my stock HTC Sensation and all was well. Today I decided to root my phone and install an ICS rom, which works fine (Android Revolution 5.0.2 if it matters). I downloaded the 4.0 and 4.0.3 SDKs as well as updated ADT but I cannot seem to be able to build for my device anymore. LogCat gives me the following warnings:

12-26 18:12:24.251: W/asset(17419): Asset path /data/local/tmp/myapp.apk is neither a directory nor file (type=0).
12-26 18:12:24.251: W/DefContainer(17419): Failed to parse package
12-26 18:12:24.251: W/ActivityManager(11546): No content provider found for permission revoke: file:///data/local/tmp/myapp.apk

In fact, I can see /data on the device but not /data/local/. Has anyone ever encountered a similar situation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

病毒体 2024-12-29 17:44:44

问题出在安装目录权限上。 /data/local 需要拥有其他人的写入和执行权限,才能正确安装 adb 包。

The problem was with the install directory permissions. /data/local needs to have write and execute rights to others in order for adb packages to install correctly.

入画浅相思 2024-12-29 17:44:44

很平常,但请务必在 Eclipse 中检查 Android 工具更新。那是我的问题。

Mundane, but be sure to check for Android tools updates in Eclipse. That was my problem.

日记撕了你也走了 2024-12-29 17:44:44

执行:

adb uninstall <package name>

然后像平常一样重新安装您的应用程序。

Do an:

adb uninstall <package name>

and then reinstall your application as normal.

冰雪之触 2024-12-29 17:44:44

貌似apk名称不能包含“$”或者“{}”之类的符号。一旦我从 apk 名称中删除这些字符,该 apk 就可以很好地安装在设备上。

It seems that the apk name cannot contain some symbols such as "$" or "{}". As soon as I deleted those characters from the apk name, the apk was installed fine on the device.

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