Could not find com.android.support:appcompat-v7:24.2.1.
Searched in the following locations:
- https://jcenter.bintray.com/com/android/support/appcompat-v7/24.2.1/appcompat-v7-24.2.1.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :app
Here the build.gradle
:
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "24.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.rts.dcmote.dcmote"
minSdkVersion 15
targetSdkVersion 30
versionCode 2
versionName "1.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:24.2.1'
}
UPDATE (June 2020): For Android Studio >=4.2.0, build.gradle in the root of the project, will be like this:
buildscript {
repositories {
google()
mavenCentral()
}
...
The dependency:
implementation 'com.android.support:appcompat-v7:24.2.1'
is very old but it exists.
Check in your top-level build.gradle
the repositories
block. You have to add the google()
repo.
allprojects {
repositories {
google()
jcenter()
}
}
In any case consider to:
28.0.0
instead of 24.2.1
google()
repo) implementation 'androidx.appcompat:appcompat:1.1.0'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With