【问题标题】:The device might have stale dexed jars that don't match the current version (dexopt error)设备可能具有与当前版本不匹配的陈旧 dexed jar(dexopt 错误)
【发布时间】:2019-10-28 09:51:48
【问题描述】:

我在尝试在 Nexus 7 API 21 上模拟程序时遇到了这个问题。在其他移动模拟器上工作正常。

10/28 14:38:22:在 Nexus 7 (2012) API 21 上启动“应用程序”。 安装没有成功。 无法安装应用程序:INSTALL_FAILED_DEXOPT 设备可能有与当前版本不匹配的陈旧 dexed jar(dexopt 错误)。

我的构建等级是:

 apply plugin: 'com.android.application'

   android {
   compileSdkVersion 29
   buildToolsVersion "29.0.1"
   defaultConfig {
   applicationId "test.taha.interactiveguitesting"
    minSdkVersion 15
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

【问题讨论】:

  • 是的,我是通过运行 API 22 的 Galaxy Nexus 模拟器来实现的。:-(

标签: android android-studio android-emulator


【解决方案1】:

在gradle.properties中添加

android.enableD8=false
android.enableD8.desugaring=false

【讨论】:

    猜你喜欢
    • 2015-06-17
    • 1970-01-01
    • 2023-03-15
    • 1970-01-01
    • 2012-01-23
    • 2018-06-07
    • 2020-03-01
    • 2014-07-13
    • 2016-07-24
    相关资源
    最近更新 更多