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:
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!