When installing APK, 2 errors occur:

DEXOPT_FAILED UID_CHANGED 

Small log:

 07-10 11:14:22.581 D/AndroidRuntime(9964): Calling main entry com.android.commands.pm.Pm 07-10 11:14:22.601 W/ActivityManager(391): No content provider found for permission revoke: file:///storage/emulated/0/AppProjects/HashcodeClient/bin/HashcodeClient.apk 07-10 11:14:22.621 I/PackageManager(391): Copying native libraries to /data/app-lib/vmdl-1984616986 07-10 11:14:22.781 W/PackageManager(391): Package couldn't be installed in /data/app/ru.hcc-1.apk 07-10 11:14:22.911 D/AndroidRuntime(9964): Shutting down VM 

If you put through the root, then the log is:

 07-10 11:14:23.141 D/AIDE (9795): pm: pkg: /storage/emulated/0/AppProjects/HashcodeClient/bin/HashcodeClient.apk 07-10 11:14:23.141 D/AIDE (9795): pm: Failure [INSTALL_FAILED_UID_CHANGED] 07-10 11:14:23.141 D/AIDE (9795): pm: exited with 0 

What I tried to do: put through a standard installer, put through the root, cleaned the project, cleaned the depths / data /, rebuilt with another keystore, 8 (!) Reloaded the device, changed the package name.

But it is my application that does not want to be installed - other packages are calmly processed by the installer. On stackoverflow I read that Wipe Data will help through Recovery, but my other data is a pity. How to get rid of these errors and put the APK to the end?

Update # 1 was able to get a more detailed log .

Update # 2 Finally managed to fix the error. Since DalvikVM swore at "L;", I compiled the APK, but did not install it, and through APKTool I got the smali-code. Then, using the editor, I found the same "L;", then deleted this file from bin / classes2 / and the program was installed normally.

And yes, this is the very function that caused the installation to fail. Maybe someone will explain to me what the error is :)

 private Object getLast(Editable text, Class kind) { Object[] objs = text.getSpans(0, text.length(), kind); if(objs.length == 0) { return null; } else { for (int i=objs.length; i > 0; i--) { if(text.getSpanFlags(objs[i-1]) == Spannable.SPAN_MARK_MARK) { return objs[i-1]; } } return null; } } 
  • Logies to the studio - Barmaley
  • @Barmaley, updated the question. - Helisia
  • @SuperCreeper can't see something here> DEXOPT_FAILED> UID_CHANGED Where is it then from? - Barmaley
  • @Barmaley, I'm sorry, I didn’t finish the ro install with root. If that, DEXOPT_FAILED exits if set after cleaning / data / garbage. - Helisia

2 answers 2

You have somewhere left a link to the application UID (usually after manually removing the app). UID is created when the application is installed and is written in the file /data/system/packages.xml - delete the entry about the package of your application in it. It may help.

  • @Barmaley, there is no record of my application in this file. Most likely I corrupted the project when I deleted the / bin folder and compiled it again. - Helisia
  • It seems that you do not have permission to write to /storage/emulated/0/AppProjects/HashcodeClient/bin/ - try chmod 775 to this directory or install via adb - Barmaley
  • @Barmaley, did not help. I sent apk to a friend, if it does not install, then it means I messed up the project. I will unsubscribe later. - Helisia
  • @Barmaley, a friend has the same mistake. I don't know what to do anymore :( - Helisia

I was helped by the deletion of the /data/data/[название вашего приложение] .

After removing the application, it happens that it remains.

  • Try to write more detailed answers. Explain what is the basis of your statement? - Nicolas Chabanovsky