Can't upload Android app to device (stale dexed jars)

后端 未结 16 506
别跟我提以往
别跟我提以往 2020-12-05 17:11

I am using Android Studio to develop this app, and today when I tried to upload it to my device to test I got a popup window saying:

Installation fail

相关标签:
16条回答
  • 2020-12-05 17:30

    Go to AVD Manager, then in the action section of your device select wipe data. This worked for me, hope it helps....

    0 讨论(0)
  • 2020-12-05 17:31

    None of answer didn't solve my problem

    you should also make progaurd for debug too. just add buildtypes to your main gradle file:

    buildTypes {
        debug {  // change release to debug
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    
    0 讨论(0)
  • 2020-12-05 17:34

    This worked for me:

    In Android Studio this can be done by clicking on Build > Clean Project. SysadminTips

    0 讨论(0)
  • 2020-12-05 17:34

    In my case was because my emulator was full of apps. I saw how much space the emulator had and was almost nothing so I deleted some apps and with this my problem was resolved

    0 讨论(0)
  • 2020-12-05 17:37

    What i did was modified build.gradle (Module:app) file.

    Initially it was

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    

    I changed it to

        buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    

    Then Rebuild and deploy !

    0 讨论(0)
  • 2020-12-05 17:41

    This helped me for the emulator: Close Emulator. Tools > AVD Manager > Select Emulator Settings > Wipe Data > Cold Boot.. Now Install App.

    Reference

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