gpt4 book ai didi

android - 由于 ':app: lintVitalRelease',任务 `Could not find multidex-instrumentation.aar` 执行失败

转载 作者:行者123 更新时间:2023-12-03 04:16:17 25 4
gpt4 key购买 nike

当我尝试在 android studio 中同步我的应用模块时,它会提示错误:

ERROR: Failed to resolve: multidex-instrumentation Affected Modules: app



当我尝试运行 gradlew assemble

Execution failed for task ':app:lintVitalRelease'.

Could not resolve all artifacts for configuration ':app:debugAndroidTestRuntimeClasspath'. Could not find multidex-instrumentation.aar (androidx.multidex:multidex-instrumentation:2.0.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/multidex/multidex-instrumentation/2.0.0/multidex-instrumentation-2.0.0.aar



this question 中列出的解决方案没有解决我的问题。
奇怪的是 什么都没有 multidex-instrumentation-2.0.0不存在 而且我不知道为什么我的应用程序会寻找这种依赖关系。
Multidex-instrumentation 2.0.0 存在于 Maven Repository .

这是我的 build.gradleapp.gradle :

应用程序.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}

maven { url 'https://maven.fabric.io/public' }
}

android {
// flavorDimensions ("resrouce")
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions{
disable 'MissingTranslation'
// checkReleaseBuilds false
// abortOnError false
}

defaultConfig {
applicationId 'com.myapp.android'
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName '1.0'
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "enableCrashlytics", "true"
ext.enableCrashlytics = true

}
releaseNonObfuscated {
minifyEnabled false
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'proguard-rules-debug.pro'
buildConfigField "boolean", "enableCrashlytics", "true"
ext.enableCrashlytics = false

}



debug {
versionNameSuffix '-DEBUG'
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "enableCrashlytics", "true"
ext.enableCrashlytics = true
}
}
dexOptions {
javaMaxHeapSize "2g"
}
sourceSets {
main {
res.srcDirs = [
'src/main/res',
'src/main/res/layout',
'src/main/res/layouts/product',
'src/myapp_eve/res'
]

}

}
productFlavors {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
configurations {
all*.exclude group: 'com.google.guava', module: 'listenablefuture'
}
}

ext {
//support_library_version = '28.0.0'
smooch_chat_librar_version = '5.16.3'
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//implementation 'com.android.support:28.0.0'
// implementation 'com.android.support:support-fragment:28.0.0'
// implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
// implementation 'com.android.support:collections:28.0.0'
// implementation 'com.android.support:versionedparcelable:28.0.0'
// implementation 'com.android.support:collections:28.0.0'
// implementation 'de.greenrobot:eventbus:2.4.0'
// implementation 'org.roboguice:roboguice:3.0.1'
// compileOnly 'org.roboguice:roboblender:4.0.0'
// annotationProcessor 'org.roboguice:roboblender:4.0.0'
// implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
// compile 'com.paypal.sdk:paypal-android-sdk:2.12.4'
// compile 'com.braintreepayments.api:braintree:2.3.9'
// compile 'com.braintreepayments.api:drop-in:2.3.8'
// implementation 'com.facebook.android:facebook-android-sdk:4.23.+'
//implementation 'org.roboguice:roboblender:4.0.0'
// implementation 'com.jakewharton:butterknife:10.0.0'

implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0-alpha01'
implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
implementation 'com.google.android.material:material:1.1.0-alpha05'
implementation 'com.google.android.material:material:1.1.0-alpha05'
implementation 'androidx.core:core:1.1.0-alpha05'
implementation 'androidx.annotation:annotation:1.1.0-beta01'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.github.rey5137:material:1.2.5'
implementation 'com.pnikosis:materialish-progress:1.5'
// implementation 'com.daimajia.slider:library:1.1.5@aar'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.commonsware.cwac:merge:1.1.2'
implementation 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'com.marshalchen.ultimaterecyclerview:library:0.3.18'
implementation 'com.github.markomilos:paginate:0.5.1'
implementation 'com.google.android.gms:play-services-vision:17.0.2'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.malinskiy:superrecyclerview:1.1.1'
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
implementation 'com.flipboard:bottomsheet-core:1.5.0'
implementation 'com.flipboard:bottomsheet-commons:1.5.0'
implementation 'org.apmem.tools:layouts:1.10@aar'
implementation(name: 'persiandatepicker-release', ext: 'aar')
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.8@aar') {
transitive = true;
}
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
implementation 'com.binjar.prefsdroid:prefs-droid:1.1.0'
implementation 'com.google.firebase:firebase-messaging:17.6.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation 'com.google.inject:guice:4.2.2'
implementation "io.smooch:core:${smooch_chat_librar_version}"
implementation "io.smooch:ui:${smooch_chat_librar_version}"

}

apply plugin: 'com.google.gms.google-services'

build.gradle

//顶级构建文件,您可以在其中添加所有子项目/模块通用的配置选项。
buildscript {
repositories {
google()
jcenter()
maven { url 'https://s3.amazonaws.com/repo.commonsware.com' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://jitpack.io' }
}
dependencies {
//vahhab change to 3.2.0
classpath 'com.android.tools.build:gradle:3.3.1'
//classpath 'com.android.tools.build:gradle:3.2.1'


//classpath 'com.google.gms:google-services:2.0.0-alpha3'
classpath 'com.google.gms:google-services:4.2.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}


buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates

// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:1.27.1'
}
}

allprojects {
repositories {
google()
jcenter()
maven { url 'https://s3.amazonaws.com/repo.commonsware.com' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://jitpack.io' }
flatDir { dirs 'libs' }
}
}

最佳答案

您应该在 gradle.properties 文件中启用 jetifier。

android.enableJetifier=true

删除 .gradle 和 .idea 文件夹,然后重建项目。

关于android - 由于 ':app: lintVitalRelease',任务 `Could not find multidex-instrumentation.aar` 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55571159/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com