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
How to Break Styled Text into Pages in Android
Listview Items Are Not Clickable. Why
How to Configure Launcher Activity Programmatically in Android
How to Store and Retrieve a Byte Array (Image Data) to and from a SQLite Database
How to Get Meid and Imei Information Using Adb Commands on Android 5.0
Failure [Install_Failed_Already_Exists] When I Tried to Update My Application
API to Automatically Upload APK to Google Play
Scale Fit Mobile Web Content Using Viewport Meta Tag
Align Top of Image to Top of Textview
How to Display Fetched JSON Data into Listview Using Baseadapter
How to Display Gif in React-Native Android App
Read Contents of a Url in Android
Why Is My Field 'Null' After Injection? How to Inject My Object
How to Add Code Obfuscation for My Android Application
How to Remove Extra Padding or Margin in Material Design Button