0

I tried everything and nothing helps me :( At first I got:

INSTALL_FAILED_DEXOPT error when trying to install application
Please check logcat output for more details.
Launch canceled!

And then the first error changed to

Installation error: INSTALL_FAILED_UID_CHANGED

I am running the app on Genymotion, so I don't have root and can't delete /data. I restarted eclipse and Genymotion (and tried different emulators in vein). I cleaned my project many times. I uninstalled every app from Settings/Apps, and cleared the app from Storage/misc. I can't factory reset Genemotion. The installation fails on my device (Galaxy 4). I also changed my package name, with no help.

My logcat shows:

cutils-trace(1311):     Error opening trace file: No such file or directory (2)
memtrack(1311):         Couldn't load memtrack module (No such file or directory)
android.os.Debug(1311): failed to load memtrack module: -2

I tried to revert the code to a known working GIT version, with no help - still installation error: INSTALL_FAILED_DEXOPT. Also - I can't open ab eclipse emulator.

What can I do?

Ran
  • 657
  • 2
  • 13
  • 29

2 Answers2

0

I don't know how, but somehow eclipse was having problem with my package. When I turned 'x_y_z' to 'test', it worked. So weird that it happened out of the blue (I had 'x_y_z' for more than 7 months...).

Ran
  • 657
  • 2
  • 13
  • 29
  • It is not a problem with eclipse essentially. Please check my answer for explanation. Happened to me thrice. :P – Swayam Oct 19 '14 at 16:26
0

This usually happens during development when some files don't get removed while installing the new apk over the existing one. If you check the LogCat, you would be able to find exactly which resource was left behind. This is mostly caused by using two different PCs to test on the same device, or also sometimes using a single PC and a BROKEN_PIPE_ERROR while trying to install over an existing version.

Since, some files corresponding to your package stay behind, an application with the same package cannot be installed, until and unless those files are removed forcefully (for which you would need root access).

Or, you could factory reset the device.

If you can't factory reset or don't have root access, you would need to change the package name of the application. Because then, it tricks the OS to believe that it is a separate application, which is why it worked in your case.

Swayam
  • 16,294
  • 14
  • 64
  • 102
  • I reseted my device *4* times, and got to noware. It didn't help me. And I got no useful information from LogCat. – Ran Oct 20 '14 at 10:15
  • ok Swayam> A possible problem is... android doesnt like the package name. I removed the - and the _ and it works... – AndreaCi Dec 17 '14 at 15:15