Android INSTALL_FAILED_UID_CHANGED

前端 未结 26 1135
走了就别回头了
走了就别回头了 2020-11-28 07:37

I have been doing debugging on Android using my Nexus 4, however I recently encountered this error here. After doing some research on this error, it seems to be an issue wit

相关标签:
26条回答
  • 2020-11-28 07:39

    It is obviously because of improper uninstall (probably due to faulty cable connection).

    SOLUTION Download SDMaid from play-store, and delete Corpse files (junk files). Re-run application. (But you need to have your device rooted)

    0 讨论(0)
  • 2020-11-28 07:41

    For me, there was a bit more to it. Simply removing /data/data/appfolder didn't help.

    The additional reason was that my external libs weren't included in .apk file because the name of folder was lib instead of libs. This has caused [INSTALL_FAILED_DEXOPT] during apk installation followed by [INSTALL_FAILED_UID_CHANGED].

    So changing libs folder name worked for me in this case.

    0 讨论(0)
  • 2020-11-28 07:42

    Restart your device, and clear your project. Basically , uninstalling would have done this for you in case if doesn't then try restarting.

    0 讨论(0)
  • 2020-11-28 07:42

    In most cases INSTALL_FAILED_DEXOPT or INSTALL_FAILED_UID_CHANGED means that you have not enought space to install the app.

    Remove some unused apps from your device or at least remove current version of your app.

    adb uninstall package-name
    

    In very rare cases there may be problem with application data. You have two options depending on whether your device is rooted or not

    Non-rooted

    Factory reset Settings -> Backup and reset -> Factory data reset (at least for Samsung S5)

    Rooted (or emulator)

    adb shell "rm -rf /data/data/package-name" 
    
    0 讨论(0)
  • 2020-11-28 07:42

    I was experiencing this issue for the past couple days on my Galaxy Note 3 test device. I have been using Calabash-Andrdoid and kept getting an error INSTALL_FAILED_UID_CHANGED, whenever the install_app method tried to execute. I was struggling with this issue because I had two test devices experiencing this. I tried everything above, including emptying out my /data/data/ app and app.test folders. I even deleted the instrumentation back-end stuff that Xamarin installs since that's the platform I used to develop my app. I could not find anything else to manually delete off of the device. When I attempted to do my work on third device and found that everything ran successfully, I realized the issue was with the devices. In the end, the only thing that worked for me was to execute a factory reset of one of the devices. I hope this helps.

    Thanks, -Shah

    0 讨论(0)
  • 2020-11-28 07:45

    Same problem on a Mediacom device, first a

    $ adb install -r platforms/android/out/android-debug-unaligned.apk
    3958 KB/s (22887489 bytes in 5.647s)
         pkg: /data/local/tmp/android-debug-unaligned.apk
         Failure [INSTALL_FAILED_DEXOPT]
    

    then a very persistent:

    $ adb install -r platforms/android/out/android-debug-unaligned.apk
    4949 KB/s (22887489 bytes in 4.515s)
         pkg: /data/local/tmp/android-debug-unaligned.apk
         Failure [INSTALL_FAILED_UID_CHANGED]
    

    Doing a factory reset didn't change the dynamic (I got both errors, in sequence).

    • installing the same app with a different id worked
    • installing a different app with the previous id doesn't

    Rooting not an option, the solution for me was a cache wipe: now the offending app id works fine and I didn't had to factory reset (again).

    Hope it helps

    0 讨论(0)
提交回复
热议问题