gpt4 book ai didi

android - 无法解析 : com. android.support :appcompat-v7:21. 0.1

转载 作者:行者123 更新时间:2023-11-29 01:12:35 25 4
gpt4 key购买 nike

我最近将 mindSdkVersion 更改为 17,将 targetSdkVersion 更改为 21,并且出现了很多错误。我修复了其中的一些问题,但无法修复这个问题:

Error:(28, 13) Failed to resolve: com.android.support:appcompat-v7:21.0.1

我在 Mac 上使用 Android Studio,并且我有 Android 支持存储库。

我的 build.gradle 文件:

apply plugin: 'com.android.application'


android {
compileSdkVersion 21
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.swit.sedamaker"
minSdkVersion 17
targetSdkVersion 21
versionCode 2
versionName "1.01"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}

dependencies {

compile 'com.android.support:appcompat-v7:21.0.1'

compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})

testCompile 'junit:junit:4.12'
}

最佳答案

错误发生是因为支持库的 21.0.1 不存在。

dependencies{

//it requires compileSdkVersion 21
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.android.support:appcompat-v7:21.0.0'

}

关于android - 无法解析 : com. android.support :appcompat-v7:21. 0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41908064/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com