I want to change the minimum SDK version in Android Studio from API 23 to API 22 as HttpClient is not supported in API 23.I have tried changing it in build.gradle(Module:app) ie I have changed the compileSdkVersion from 23 to 22 and targetSdkVersion from 23 to 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'
}
Then, sync and rebuild the project. But i got the following error in gradle console
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.
The error is in the file v23\values-v23.xml
Any help will be greatly appreciated. Thanks!!!
Change it in your AndroidManifest.xml
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
Cheers