问题描述
我有问题,在真正的Android设备上运行Android应用程序,从偏食
当我点击运行它只是告诉我这个错误:安装错误: INSTALL_FAILED_UID_CHANGED
logcat的:
[2012-09-09 14点38分26秒 - SearchApp] Android的推出!
[2012-09-09 14点38分26秒 - SearchApp]亚洲开发银行运行正常。
[2012-09-09 14点38分26秒 - SearchApp]执行com.example.MainActivity活动启动
[2012-09-09 14点38分26秒 - SearchApp]自动目标模式:使用设备cff192abd7f551f
[2012-09-09 14点38分26秒 - SearchApp]上传SearchApp.apk到设备cff192abd7f551f
[2012-09-09 14点38分27秒 - SearchApp]安装SearchApp.apk ...
[2012-09-09 14时38分28秒 - SearchApp]安装错误:INSTALL_FAILED_UID_CHANGED
[2012-09-09 14时38分28秒 - SearchApp]请logcat的输出获取更多信息。
[2012-09-09 14时38分28秒 - SearchApp]启动取消!
我终于找到了INSTALL_FAILED_DEXOPT和INSTALL_FAILED_UID_CHANGED错误的解
很多测试有所不同的是徒劳的技巧后,我终于找到了解决方案,主要永远解决这个棘手的问题!
我认为这个问题是由于一个Eclipse错误!只是因为一个字符串名称(进一步说明)
,其实日食不能复制和安装内置APK文件我要补充一点,当你使用的技巧在互联网上,如数据删除包名称的文件夹/数据,你将面临一个新的粘性错误 INSTALL_FAILED_DEXOPT
那么让我们看看如何解决 INSTALL_FAILED_DEXOPT 和 INSTALL_FAILED_UID_CHANGED
在我的情况下,当我检查日志猫,我注意到下面几行:
09-30 19:03:19.882:I / PackageManager(314):上运行dexopt:com.example.searchapp
09-30 19:03:19.921:E / dalvikvm(6129):无效的名称:search_country_name
09-30 19:03:19.921:E / dalvikvm(6129):问题与项目226 @偏移0x2094
09-30 19:03:19.921:E / dalvikvm(6129):跨项验证部分类型0004失败
09-30 19:03:19.921:E / dalvikvm(6129):错误:字节交换+验证失败
09-30 19:03:19.961:E / dalvikvm(6129):优化失败
09-30 19:03:19.961:W / INSTALLD(144):DexInv:--- END/data/app/com.example.searchapp-1.apk'---状态=为0xFF00,进程失败
09-30 19:03:19.961:E / INSTALLD(144):dexopt失败的/data/dalvik-cache/data@app@com.example.searchapp-1.apk@classes.dexRES = 65280
09-30 19:03:19.961:W / PackageManager(314):包无法安装在/data/app/com.example.searchapp-1.apk
正如你所看到的下联是:无效的名字:search_country_name
这是在String.xml我的字符串名称之一
所以我删除该字符串和评论都引用codeS
然后我删除包名称的文件夹中/数据/数据(如果您使用的是实际的设备,你应该有root权限,如果你使用的是仿真器刚擦的数据打开模拟器前或制作一个新的AVD)
现在的问题就解决了!
您可以轻松地继续编码!
I have problem with running an android application from eclipse on real android device
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!
I EVENTUALLY FOUND THE SOLUTION FOR INSTALL_FAILED_DEXOPT and INSTALL_FAILED_UID_CHANGED ERROR
After lot of testing a vary of tricks in vain, I eventually found the main solution to solve this sticky problem forever!
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)
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"
So lets see how to solve INSTALL_FAILED_DEXOPT and INSTALL_FAILED_UID_CHANGED
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
As you can see the second line is: Invalid name: 'search_country_name'
This is one of my string names in String.xml
So I delete this string and comment all referenced codes
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)
Now the problem is solved!
You can easily continue coding!
这篇关于Eclipse的安装错误:INSTALL_FAILED_UID_CHANGED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!