简体   繁体   English

无法解析依赖项 androidx.test:core:1.9.0-alpha01

[英]Unable to resolve dependency androidx.test:core:1.9.0-alpha01

I have tried lot but I having this issue try generate release build我已经尝试了很多但我有这个问题尝试生成发布版本

Could not find androidx.test:core:1.9.0-alpha01.找不到 androidx.test:core:1.9.0-alpha01。 Searched in the following locations:在以下位置搜索:

   - https://dl.google.com/dl/android/maven2/androidx/test/core/1.9.0-alpha01/core-1.9.0-alpha01.pom
   - https://jcenter.bintray.com/androidx/test/core/1.9.0-alpha01/core-1.9.0-alpha01.pom
   - https://repo.maven.apache.org/maven2/androidx/test/core/1.9.0-alpha01/core-1.9.0-alpha01.pom

Kindly assist me to resolve this error请协助我解决此错误

Gradle: Gradle:

ext {
 // region Testing
    junit_version = '4.13.2'
    espresso_version = '3.5.0-alpha04'
    mockito_version = '4.3.1'
    mockito_android_version = '4.3.1'
    test_version = '1.9.0-alpha01'
    test_ext_version = '1.1.4-alpha04'
    arch_testing_version = '2.1.0'
    // endregion
}



android {

    compileSdkVersion 32
       
}

androidExtensions {
    experimental = true
}

dependencies {
  

    // region Testing - JUnit
    testImplementation "junit:junit:$junit_version"
    testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutine_version"
    testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
    testImplementation "org.mockito:mockito-core:$mockito_version"
    // endregion

    // region Testing - Instrumented
    androidTestImplementation "androidx.test:core:$test_version"
    androidTestImplementation "androidx.test:runner:$test_version"
    androidTestImplementation "androidx.test:monitor:$test_version"
    androidTestImplementation "androidx.test:rules:$test_version"
    androidTestImplementation "androidx.test.ext:junit:$test_ext_version"
    androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
    androidTestImplementation "androidx.arch.core:core-testing:$arch_testing_version"
    androidTestImplementation "androidx.room:room-testing:$room_version"
    androidTestImplementation "org.mockito:mockito-core:$mockito_version"
    androidTestImplementation "org.mockito:mockito-android:$mockito_android_version"
    androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutine_version"
    androidTestImplementation "com.squareup.okhttp3:mockwebserver:$okhttp_version"
    androidTestUtil "androidx.test:orchestrator:$test_version"
    // endregion

  
}

Try changing this:尝试改变这个:

test_version = '1.9.0-alpha01'

To this:对此:

test_version = '1.4.1-alpha04'

(I think the version you declared doesn't exist: https://developer.android.com/jetpack/androidx/releases/test ) (我认为您声明的版本不存在: https://developer.android.com/jetpack/androidx/releases/test

subprojects {
  project.configurations.all {
     resolutionStrategy.eachDependency { details ->
        if (details.requested.group == 'com.android.support'
              && !details.requested.name.contains('multidex') ) {
           details.useVersion "version which should be used - in your case 26.0.0-beta2"
        }
     }
  }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法解析 ':feature@debugFeature/compileClasspath' 的依赖:无法解析 androidx.annotation:annotation:1.0.0-rc01 - Unable to resolve dependency for ':feature@debugFeature/compileClasspath': Could not resolve androidx.annotation:annotation:1.0.0-rc01 无法通过 androidTestImplementation 下载外部库“androidx.test” - Can't download external library "androidx.test" via androidTestImplementation 无法解析':app @ debug / compileClasspath'的依赖项:无法解析androidx - Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve androidx 什么是AndroidX.Test框架,它如何影响我的单元/机器人/咖啡测试? - What is the AndroidX.Test Framework and how does it affect my unit/robolectric/espresso tests? Gradle 无法解析 androidx.appcompat:appcompat:1.1.0-alpha01 和 com.google.android.gms:play-services-nearby:16.0.0 - Gradle cannot resolve androidx.appcompat:appcompat:1.1.0-alpha01 and com.google.android.gms:play-services-nearby:16.0.0 AndroidX.Test ActivityScenario:java.lang.AssertionError:Activity 永远不会变成请求状态“[RESUMED]”(最后一个生命周期转换 =“STOPPED”) - AndroidX.Test ActivityScenario: java.lang.AssertionError: Activity never becomes requested state "[RESUMED]" (last lifecycle transition = "STOPPED") 无法添加依赖:无法解决:androidx.lifecycle:lifecycle-extensions:2.2.0-rc2 - Unable to add dependency: Failed to resolve: androidx.lifecycle:lifecycle-extensions:2.2.0-rc2 无法解析 ':app@debugUnitTest/compileClasspath' 的依赖:无法解析 androidx.legacy:legacy-support-v4:1.0.0 - Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve androidx.legacy:legacy-support-v4:1.0.0 错误:无法解析':react-native-maps @ debug / compileClasspath'的依赖项:无法解析androidx.appcompat:appcompat:1.0.0 - ERROR: Unable to resolve dependency for ':react-native-maps@debug/compileClasspath': Could not resolve androidx.appcompat:appcompat:1.0.0 错误:无法解析“:app@debug/compileClasspath”的依赖关系:无法解析androidx.legacy:legacy-support-v4:1.0.0,为什么? - ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve androidx.legacy:legacy-support-v4:1.0.0, why?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM