【发布时间】:2017-06-13 23:12:14
【问题描述】:
我最近将 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'
}
【问题讨论】:
标签: android