Jonathan Vukadinovic Jonathan Vukadinovic - 2 months ago 32
Android Question

downgrading from sdk 23 to 22 android

I decided to reduce my api level from 23 to 22. To begin with, I downloaded android studio with the latest 23 API installed. I installed the 22 API now but I don't know if I installed the other stuff like:

compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'


Can't find where to look if these are installed... So this is how my manifest looks like:

apply plugin: 'com.android.application'

android {
compileSdkVersion 22 //changed this, used to be 23
buildToolsVersion "22.0.0" //changed this also, but I don't know if it's installed....

defaultConfig {
applicationId "xxx"
minSdkVersion 16
targetSdkVersion 22
versionCode 11
versionName "2.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { java.srcDirs = ['src/main/java', 'libs'] } }
}

repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.twitter.sdk.android:tweet-composer:1.0.2@aar') {
transitive = true;
}
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:22.2.0'//changed this also, but I don't know if it's installed....
compile 'com.android.support:design:22.2.0'//changed this also, but I don't know if it's installed....
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.google.android.gms:play-services-identity:8.4.0'
}


So when I try to sync it gives me this crap:

C:\Users\jonathan\AndroidStudioProjects\TrashOmeter\app\build\intermediates\res\merged\debug\values-v23\values-v23.xml
Error:(18) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:Execution failed for task ':app:processDebugResources'.


com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\jonathan\AppData\Local\Android\sdk\build-tools\22.0.0\aapt.exe'' finished with non-zero exit value 1


enter image description here

enter image description here

How do I get it to compile with 22 sdk correctly???

Answer

So thanks to CommonsWare I found the answer. I had to change the google play dependency to a lower version. So in gradle I changed:

From:

compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'

To:

compile 'com.google.android.gms:play-services:7.3.0'
compile 'com.google.android.gms:play-services-identity:7.3.0'