I create an new android project It shows errors on built
I tried the exiting answers
Add below repository in your build.gradle file,
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
you forgot to add this to your dependencies
androidTestCompile 'com.google.code.findbugs:jsr305:3.0.0'
The problem is caused by espresso library , if you can't remove it add this to your app gradle
android
{
configurations.all
{
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
}
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'
}