Android Studio pm install aborted

后端 未结 4 1359
不思量自难忘°
不思量自难忘° 2021-01-17 23:21

Im trying to run an application on my GS5 from android studio and Im getting this:

Waiting for device.
Target device: samsung-sm_g900v-f3af9744
Uploading fi         


        
4条回答
  •  一向
    一向 (楼主)
    2021-01-17 23:40

    Possible Solutions :

    1. Check if your app had left any datas :

    First if the app is already installed, then clean cache data and uninstall it Under "System Settings" then "Application Manager" http://i.stack.imgur.com/b3oys.jpg

    Then

    • Force uninstall by running & adb shell pm uninstall com.brian.testproject
    • Check "/data/data/com.brian.testproject/" and delete it
    • Remove any entries of your package on /data/system/packages.xml
    • Remove any entries of your package on /data/system/packages.list
    • Also you could install SDMaiD and clean your device, especially with "CorpseFinder" and "AppCleaner"

    2. Try to install the app manually and debug the result :

    In your case you have an issue with pm over android studio... install it manually to have a more detailed message over command line

    $ adb push D:\Android\..\TestProject-debug.apk /sdcard/myapp.apk
    $ adb shell pm install /sdcard/myapp.apk
    

    3. Check Android Studio and your app sources

    Change the targeted api level :

    • Right click on your app dir + Open Module Settings + app + check sdk version + change target and minimum under "Flavor"
    • Sync gradle button
    • Rebuild project
    • https://www.youtube.com/watch?v=v4b7C6Q-9dI

    • Update your android studio if you don't have the last release
    • If your app use libraries, you have to recompile them.

    4. Check System Settings :

    • Check BOOTCLASSPATH of your init.rc. BOOTCLASSPATH must include /system/framework/ext.jar and /system/framework/framework.jar and so on.

    • Check DEXPREOPT_BOOT_JARS of build/core/dex_preopt.mk. DEXPREOPT_BOOT_JARS must include ext and framework and so on.

    • The order of all items on BOOTCLASSPATH must be equal to the order of all items on DEXPREOPT_BOOT_JARS.


    5. Try pm command directly on the device :

    if pm command does not work try that command with a terminal directly on the phone to see if it's a connection issue between pc and phone

    pm install /sdcard/myapp.apk
    

    6. Reinstall your rom once again (just reinstall it) no need to erase.

提交回复
热议问题