Eclipse Installation error: INSTALL_FAILED_UID_CHANGED

后端 未结 11 1688
粉色の甜心
粉色の甜心 2020-11-28 12:45

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

相关标签:
11条回答
  • 2020-11-28 13:35

    So if you come this down to find this.. nothing might have worked for you. There is however an easy fix for this. 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 13:37

    Alternatively, delete the emulator and reconfigure it afresh.

    0 讨论(0)
  • 2020-11-28 13:38

    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:

    09-30 19:03:19.882: I/PackageManager(314): Running dexopt on: com.example.searchapp
    09-30 19:03:19.921: E/dalvikvm(6129): Invalid name: 'search_‌country_name'
    09-30 19:03:19.921: E/dalvikvm(6129): Trouble with item 226 @ offset 0x2094
    09-30 19:03:19.921: E/dalvikvm(6129): Cross-item verify of section type 0004 failed
    09-30 19:03:19.921: E/dalvikvm(6129): ERROR: Byte swap + verify failed
    09-30 19:03:19.961: E/dalvikvm(6129): Optimization failed
    09-30 19:03:19.961: W/installd(144): DexInv: --- END '/data/app/com.example.searchapp-1.apk' --- status=0xff00, process failed
    09-30 19:03:19.961: E/installd(144): dexopt failed on '/data/dalvik-cache/data@app@com.example.searchapp-1.apk@classes.dex' res = 65280
    09-30 19:03:19.961: W/PackageManager(314): Package couldn't be installed in /data/app/com.example.searchapp-1.apk
    

    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!

    0 讨论(0)
  • 2020-11-28 13:40

    There is already a data directory with the name of package you are trying to install with a different UID assigned. Get a root access and then try removing the already existed directory with the following command in cmd

      rm -r /data/data/com.your.package
    

    Or try to rename your application package to run it on your device.

    0 讨论(0)
  • 2020-11-28 13:40

    This solution worked for me:

    1. Put your APK to the device's storage/sd card

    2. adb shell pm install -l -r "/sdcard/<apk_filename>.apk"

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