无法通过 Eclipse 在 Android 设备上安装 APK [英] Cannot install APK on Android device through Eclipse
问题描述
不久前,我开始使用 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 给了我以下警告:
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
事实上,我可以在设备上看到/data 但看不到/data/local/.有没有人遇到过类似的情况?
In fact, I can see /data on the device but not /data/local/. Has anyone ever encountered a similar situation?
推荐答案
问题在于安装目录权限./data/local 需要对others 拥有写入和执行权限,才能正确安装 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.
这篇关于无法通过 Eclipse 在 Android 设备上安装 APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!