Eclipse 安装错误:INSTALL_FAILED_UID_CHANGED [英] Eclipse Installation error: INSTALL_FAILED_UID_CHANGED
问题描述
我在真正的 android 设备上从 eclipse 运行一个 android 应用程序时遇到问题
I have problem with running an android application from eclipse on real android device
当我点击 Run it 时,只显示这个错误:安装错误:INSTALL_FAILED_UID_CHANGED
when I click on Run it just show me this error:
Installation error: INSTALL_FAILED_UID_CHANGED
Logcat:
[2012-09-09 14:38:26 - SearchApp] Android Launch!
[2012-09-09 14:38:26 - SearchApp] adb is running normally.
[2012-09-09 14:38:26 - SearchApp] Performing com.example.MainActivity activity launch
[2012-09-09 14:38:26 - SearchApp] Automatic Target Mode: using device 'cff192abd7f551f'
[2012-09-09 14:38:26 - SearchApp] Uploading SearchApp.apk onto device 'cff192abd7f551f'
[2012-09-09 14:38:27 - SearchApp] Installing SearchApp.apk...
[2012-09-09 14:38:28 - SearchApp] Installation error: INSTALL_FAILED_UID_CHANGED
[2012-09-09 14:38:28 - SearchApp] Please check logcat output for more details.
[2012-09-09 14:38:28 - SearchApp] Launch canceled!
推荐答案
我最终找到了 INSTALL_FAILED_DEXOPT 和 INSTALL_FAILED_UID_CHANGED 错误的解决方案
经过无数次的尝试,各种技巧都徒劳无功,我终于找到了永远解决这个棘手问题的主要解决方案!
After lot of testing a vary of tricks in vain, I eventually found the main solution to solve this sticky problem forever!
我认为问题是由 Eclipse 错误引起的!, 实际上eclipse不能仅仅因为一个字符串名称就复制和安装构建的APK文件(进一步描述)
I think the problem is caused by an Eclipse bug! , in fact eclipse can not copy and install built APK file just because of a string name(described further)
我应该补充一点,当您在互联网上使用技巧(例如删除数据/数据中的包名称文件夹)时,您将面临新的粘性错误INSTALL_FAILED_DEXOPT"
I should add that when you use tricks on internet such as delete package name folder in data/data you will face a new sticky error "INSTALL_FAILED_DEXOPT"
那么让我们看看如何解决INSTALL_FAILED_DEXOPT和INSTALL_FAILED_UID_CHANGED
So lets see how to solve INSTALL_FAILED_DEXOPT and INSTALL_FAILED_UID_CHANGED
就我而言,当我检查 log cat 时,我注意到以下几行:
In my case, when i check the log cat i noticed below lines:
09-30 19:03:19.882: I/PackageManager(314): Running dexopt on: com.example.searchapp
09-30 19:03:19.921: E/dalvikvm(6129): Invalid name: 'search_country_name'
09-30 19:03:19.921: E/dalvikvm(6129): Trouble with item 226 @ offset 0x2094
09-30 19:03:19.921: E/dalvikvm(6129): Cross-item verify of section type 0004 failed
09-30 19:03:19.921: E/dalvikvm(6129): ERROR: Byte swap + verify failed
09-30 19:03:19.961: E/dalvikvm(6129): Optimization failed
09-30 19:03:19.961: W/installd(144): DexInv: --- END '/data/app/com.example.searchapp-1.apk' --- status=0xff00, process failed
09-30 19:03:19.961: E/installd(144): dexopt failed on '/data/dalvik-cache/data@app@com.example.searchapp-1.apk@classes.dex' res = 65280
09-30 19:03:19.961: W/PackageManager(314): Package couldn't be installed in /data/app/com.example.searchapp-1.apk
如您所见,第二行是:无效名称:'search_country_name'
这是我在 String.xml 中的字符串名称之一
This is one of my string names in String.xml
所以我删除这个字符串并注释所有引用的代码
So I delete this string and comment all referenced codes
然后我删除/data/data 中的包名文件夹(如果您使用的是实际设备,您应该具有 root 访问权限,如果您使用的是模拟器,只需在打开模拟器之前擦除数据或制作新的 AVD)
Then I delete the package name folder in /data/data (if you are using a actual device you should have root access , if you are using emulator just wipe data before opening emulator or make a new AVD)
现在问题解决了!
您可以轻松地继续编码!
You can easily continue coding!
这篇关于Eclipse 安装错误:INSTALL_FAILED_UID_CHANGED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!