Error:Unable to Resolve Dependency for ':App@Debugandroidtest/Compileclasspath': Could Not Resolve Junit:Junit:4.12

Error:Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve junit:junit:4.12

I was trying to mix AppCompat and Jetpack dependencies, and you cannot do that.

I think I might not have the right repository setup for the Jetpack libraries (why it can't find any Jetpack libraries).

Don't use: implementation 'androidx.appcompat:appcompat:1.0.2' . (this is Jetpack) -- use AppCompat versions of this (besides - Jetpack is NOT consistent with Appcompat versions earlier then 28.x). Bottom line, get rid of anything that says (androidx).

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
}

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download okhttp.jar (com.squareup.okhttp3:okhttp:4.3.1)

From this answer: you can add it like this

implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.8.0'

and to get dependencies from maven you need to add this to your repositories

repositories {
mavenCentral()
}


Related Topics



Leave a reply



Submit