【发布时间】:2020-10-11 06:14:09
【问题描述】:
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
这里是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'
}
【问题讨论】:
-
appcompat好像没有这个特定版本,你需要这个版本还是appcompat的任何版本都可以? -
@LiuWenbin_NO.
appcompat-v7:24.2.1存在,但您必须添加google()存储库。
标签: android android-layout android-support-library androidx