:::: MENU ::::
Posts tagged with: AndroidManifest.xml

Android issue: INSTALL_FAILED_UID_CHANGED fixed without root or device factory reset

If you are here you probably had the issue from the title the error INSTALL_FAILED_UID_CHANGED when you want to install for debug the app from Eclipse or Android Studio.

I had this issue yesterday and after hours of browsing the stackoverflow and groups and forums I found 3 methods to fix this.

1. if you test on an emulator then you just have to Clear/Wipe the AVD to defaults or create a new one.

2. you are on a real device. If you have root access to the device just go to folder


and delete it. You should ok now.

3. Device with no ROOT Access. On internet there is just one single method to factory reset the device. If this is acceptable for you this is easy.

None of this methods was OK for me. I was testing on a real device with NO-ROOT but I did not want to factory reset it. Continue Reading

Android get versionCode and versionName from your AndroidManifest.xml

Sometimes showing version in your app is a good think, and when you do this a good think is to not have 2 ore more places where wou have to maintain tha app version for every releases.

In your AndroidManifest.xml there is required 2 fields

android:versionCode witch is an int with the app version

android:versionName witch is a string something like 1.0.1 showing app version.

It is recomanded to use them and do not maintain a separate constant for using it in your code. Ok so programmatically you can retrieve this fields from your AndroidManifest.xml like this:

/* Get android:versionName */
String versionName = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;

/* Get android:versionCode */
int versionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;