I was trying to get the Support7Demos to build, but I kept running into problems.
Initial errors:
Error:(23, 21) No resource found that matches the given name: attr 'colorAccent'.
Error:(21, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(22, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.
Error:(23, 21) No resource found that matches the given name: attr 'colorAccent'.
Error:(21, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(22, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(35, 21) No resource found that matches the given name: attr 'alertDialogTheme'.
Error:(21, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(22, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Dialog.Alert'.
Error:(21, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(22, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(35, 21) No resource found that matches the given name: attr 'alertDialogTheme'.
Error:(21, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(22, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(35, 21) No resource found that matches the given name: attr 'alertDialogTheme'.
Error:(21, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(22, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog.Alert'.
Error:(21, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(22, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog.Alert'.
Error:(21, 21) No resource found that matches the given name: attr 'colorPrimary'.
Error:(22, 21) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '***'' finished with non-zero exit value 1
Changed compilesDkVersion
to 21 and my targetSdkVersion
to 21 as well. No difference.
Then I changed:
compile 'com.android.support:appcompat-v7:18.0.+'
to
compile 'com.android.support:appcompat-v7:21.0.+'
Now I am getting:
Error:(35, 21) No resource found that matches the given name: attr 'alertDialogTheme'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Dialog.Alert'.
Error:(35, 21) No resource found that matches the given name: attr 'alertDialogTheme'.
Error:(35, 21) No resource found that matches the given name: attr 'alertDialogTheme'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog.Alert'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog.Alert'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '***'' finished with non-zero exit value 1
Finally changed compile 'com.android.support:appcompat-v7:21.0.+'
to v23 as it recommended...But this is where I run into a wall. Final errors:
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '***'' finished with non-zero exit value 1
My best google search led to Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23 but if I change the compile version to 23 then I just get a host of new errors and I'm back to square 1.
Here is my build.gradle that gives the least amount of errors:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.example.android.supportv7"
minSdkVersion 7
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.0.+'
}
As a note, changing the build tools didn't seem to do anything.