John
John

Reputation: 8946

Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'

I am not able to build my project, as I am getting this error

Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(33) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processStageDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/john/Library/Android/sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
/Users/john/AndroidStudioProjects/app/build/intermediates/res/merged/stage/debug/values-v23/values-v23.xml

This is my build.gradle

android {
def versionCodeValue = 1
def versionNameValue = "1.0"

compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.sample.test"
    minSdkVersion 17
    targetSdkVersion 22
    versionCode versionCodeValue
    versionName versionNameValue
}
}
dependencies {
  def supportLibVersion = "22.2.1"
  compile 'com.android.support:support-v4:' + supportLibVersion
  compile 'com.android.support:design:' + supportLibVersion
  compile 'com.android.support:appcompat-v7:' + supportLibVersion
  compile 'com.android.support:cardview-v7:' + supportLibVersion
  compile 'com.android.support:recyclerview-v7:' + supportLibVersion
}

I am getting this error after updating supportlibrary. I don't want to use target SDK 23. I don't want RuntimePermission in app

This is my styles.xml

 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorPrimary</item>
    <item name="android:windowBackground">@color/colorLightGrey</item>
    <item name="android:textViewStyle">@style/myTextViewStyle</item>
    <item name="android:buttonStyle">@style/myButtonStyle</item>
    <item name="android:editTextStyle">@style/myEditTextStyle</item>
</style>

I not understanding why it shows error values-v23.xml as i am not using version 23 at all. It shows error in

/Users/john/AndroidStudioProjects/app/build/intermediates/res/merged/stage/debug/values-v23/values-v23.xml

Upvotes: 2

Views: 2014

Answers (1)

wanglugao
wanglugao

Reputation: 281

Changing your activity style to older one for example Theme.AppCompat.Light.DarkActionBar may help and changing AppCompatActivity to Activity at the same time.

You can select theme in this dialog: enter image description here

Upvotes: 1

Related Questions