Error:(24, 11) Failed to resolve: com.android.support:appcompat-v7:8.0.+
Error:(24, 11) Failed to resolve: com.android.support:appcompat-v7:8.0.+
请帮助解决这个错误,因为这是我的第一个 android 项目!
Gradle同步:
应用插件:'com.android.application'
android {
compileSdkVersion 8
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.interceptor.myapplication"
minSdkVersion 5
targetSdkVersion 8
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:8.0.+'
}
在 Gradle 控制台上我得到:
失败:构建失败,出现异常。
出了什么问题:
配置项目“:app”时出现问题。
Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not find any version that matches com.android.support:appcompat-v7:8.0.+.
Versions that do not match:
24.0.0-alpha1
23.2.1
23.2.0
23.1.1
23.1.0
+ 14 more
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/appcompat-v7/maven-metadata.xml
https://jcenter.bintray.com/com/android/support/appcompat-v7/
file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/maven-metadata.xml
file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/maven-metadata.xml
file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/
Required by:
MyApplication:app:unspecified
尝试:
运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。
构建失败
您应该为 appcompat-v7
依赖项使用正确的版本。
上述依赖到现在的最新稳定版本为:
compile 'com.android.support:appcompat-v7:23.2.1'
按照上面的方法使用它,并确保你installed/updated之前在SDK管理器中升级到最新版本。
请帮助解决这个错误,因为这是我的第一个 android 项目! Gradle同步: 应用插件:'com.android.application'
android {
compileSdkVersion 8
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.interceptor.myapplication"
minSdkVersion 5
targetSdkVersion 8
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:8.0.+'
}
在 Gradle 控制台上我得到: 失败:构建失败,出现异常。
出了什么问题: 配置项目“:app”时出现问题。
Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find any version that matches com.android.support:appcompat-v7:8.0.+. Versions that do not match: 24.0.0-alpha1 23.2.1 23.2.0 23.1.1 23.1.0 + 14 more Searched in the following locations: https://jcenter.bintray.com/com/android/support/appcompat-v7/maven-metadata.xml https://jcenter.bintray.com/com/android/support/appcompat-v7/ file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/maven-metadata.xml file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/maven-metadata.xml file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/ Required by: MyApplication:app:unspecified
尝试: 运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。
构建失败
您应该为 appcompat-v7
依赖项使用正确的版本。
上述依赖到现在的最新稳定版本为:
compile 'com.android.support:appcompat-v7:23.2.1'
按照上面的方法使用它,并确保你installed/updated之前在SDK管理器中升级到最新版本。