我想将 Android Studio 中的最低 SDK 版本从 API 23 更改为 API 22,因为 API 23 不支持 HttpClient。我尝试在 build.gradle(Module:app) 中更改它,即我已将 compileSdkVersion 从 23 更改为 22和 targetSdkVersion 从 23 到 22。
android {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.test.gcmgreetingapp"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.google.android.gms:play-services:7.8.0'
compile project(':android-query-full.0.26.7')
compile 'com.loopj.android:android-async-http:1.4.8'
}
然后,同步并重建项目。但我在 gradle 控制台中收到以下错误
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027android:TextAppearance.Material.Widget.Button.Inverse\u0027.","sources":[{"file":"C:\\Users\\nischal.manandhar\\AndroidStudioProjects\\GCMGreetingApp\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.0.0\\res\\values-v23\\values-v23.xml","position":{"startLine":1}}],"original":""}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027android:Widget.Material.Button.Colored\u0027.","sources":[{"file":"C:\\Users\\nischal.manandhar\\AndroidStudioProjects\\GCMGreetingApp\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.0.0\\res\\values-v23\\values-v23.xml","position":{"startLine":1}}],"original":""}
FAILED
FAILURE: Build failed with an exception.
错误在文件 v23\values-v23.xml 中
任何帮助将不胜感激。谢谢!!!