1

I started an android project in android studio. The target and compile sdk version was set to 24 by default. I wanted to decrease the target and compile sdk version to 21 and when I changed it in build.gradle(app) to 21 and synced the project ,it is showing the following errors:

 Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
    Information:BUILD FAILED
C:\Users\panwa\Desktop\1989\Tasks\app\build\intermediates\res\merged\debug\values-v23\values-v23.xml
Error:(34) 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 'C:\Users\panwa\AppData\Local\Android\Sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1

How to change it so that no error occurss and secondly is there any way that we set target sdk version to be 21 from the begining of the project because by default it sets them to 24.

Shivam Panwar
  • 396
  • 1
  • 3
  • 9

1 Answers1

0

Might be your build.gradle includes a different support library version. You can change it back to 'com.android.support:appcompat-v7:22.2.1' and try building it. The only thing you might get is android studio telling you there's a newer version available.

For more details you can refer Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23

Community
  • 1
  • 1
Neh
  • 442
  • 4
  • 7