0

My gradle file like this

apply plugin: 'com.android.application'

 android {
   compileSdkVersion 19
   buildToolsVersion "19.1.0"

defaultConfig {
    applicationId "com.test.app"
    minSdkVersion 19
    targetSdkVersion 19

    ndk {
        moduleName "opus"
    }
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}

dependencies {
    compile 'com.android.support:support-v4:19.1.0'
    compile 'com.google.android.gms:play-services:+'
    compile 'com.google.code.gson:gson:2.2.4'

}

I got following error during build

<path to project>/app/build/intermediates/res/merged/debug/values-v21/values-v21.xml

Error:(16) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.
Error:(18) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'.
Error:(24) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'.
Error:(31) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small.Inverse'.
Error:(209) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'.
Error:(211) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'.
Error:(214) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
Error:(224) Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'.
Error:(231) Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
Error:(177) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
Error:(9) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
Error:(6) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'.
Error:(7) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'.
Error:(8) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'.
Error:(10) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'.
Error:(11) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'.
Error:(12) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'.
Error:(13) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'.
Error:(14) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'.
Error:(15) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'.
Error:(17) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'.
Error:(19) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
Error:(21) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
Error:(23) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium'.
Error:(25) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Menu'.
Error:(26) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.SearchResult.Subtitle'.
Error:(28) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.SearchResult.Title'.
Error:(30) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small'.
Error:(32) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Subhead'.
Error:(33) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Title'.
Error:(34) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
Error:(36) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
Error:(38) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'.
Error:(40) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
Error:(42) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'.
Error:(44) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'.
Error:(46) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'.
Error:(48) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
Error:(50) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
Error:(52) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
Error:(53) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.TextView.SpinnerItem'.
Error:(54) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
Error:(56) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
Error:(166) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'.
Error:(168) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
Error:(170) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
Error:(172) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
Error:(175) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
Error:(178) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button'.
Error:(179) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Borderless'.
Error:(180) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Borderless.Colored'.
Error:(181) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Small'.
Error:(182) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ButtonBar'.
Error:(183) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.CompoundButton.CheckBox'.
Error:(184) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.CompoundButton.RadioButton'.
Error:(185) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.DropDownItem.Spinner'.
Error:(186) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
Error:(188) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
Error:(190) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
Error:(192) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.PopupMenu'.
Error:(198) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'.
Error:(200) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'.
Error:(201) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'.
Error:(203) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'.
Error:(213) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.RatingBar'.
Error:(215) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
Error:(220) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner.Underlined'.
Error:(221) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.TextView.SpinnerItem'.
Error:(222) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Toolbar.Button.Navigation'.
<path to app>/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/res/values-v21/values-v21.xml
Error:(77, 5) No resource found that matches the given name: attr 'android:colorAccent'.
Error:(77, 5) No resource found that matches the given name: attr 'android:colorButtonNormal'.
Error:(77, 5) No resource found that matches the given name: attr 'android:colorControlActivated'.
Error:(77, 5) No resource found that matches the given name: attr 'android:colorControlHighlight'.
Error:(77, 5) No resource found that matches the given name: attr 'android:colorControlNormal'.
Error:(77, 5) No resource found that matches the given name: attr 'android:colorPrimary'.
Error:(77, 5) No resource found that matches the given name: attr 'android:colorPrimaryDark'.
Error:(126, 5) No resource found that matches the given name: attr 'android:windowElevation'.
Error:(129, 5) No resource found that matches the given name: attr 'android:colorAccent'.
Error:(129, 5) No resource found that matches the given name: attr 'android:colorButtonNormal'.
Error:(129, 5) No resource found that matches the given name: attr 'android:colorControlActivated'.
Error:(129, 5) No resource found that matches the given name: attr 'android:colorControlHighlight'.
Error:(129, 5) No resource found that matches the given name: attr 'android:colorControlNormal'.
Error:(129, 5) No resource found that matches the given name: attr 'android:colorPrimary'.
Error:(129, 5) No resource found that matches the given name: attr 'android:colorPrimaryDark'.
Error:(178, 5) No resource found that matches the given name: attr 'android:windowElevation'.
Error:(211, 5) No resource found that matches the given name: attr 'android:overlapAnchor'.
Error:(222, 5) No resource found that matches the given name: attr 'android:overlapAnchor'.
Error:(257, 5) No resource found that matches the given name: attr 'android:colorAccent'.
Error:(257, 5) No resource found that matches the given name: attr 'android:colorButtonNormal'.
Error:(257, 5) No resource found that matches the given name: attr 'android:colorControlActivated'.
Error:(257, 5) No resource found that matches the given name: attr 'android:colorControlHighlight'.
Error:(257, 5) No resource found that matches the given name: attr 'android:colorControlNormal'.
Error:(257, 5) No resource found that matches the given name: attr 'android:colorPrimary'.
Error:(257, 5) No resource found that matches the given name: attr 'android:colorPrimaryDark'.
Error:(267, 5) No resource found that matches the given name: attr 'android:colorAccent'.
Error:(267, 5) No resource found that matches the given name: attr 'android:colorButtonNormal'.
Error:(267, 5) No resource found that matches the given name: attr 'android:colorControlActivated'.
Error:(267, 5) No resource found that matches the given name: attr 'android:colorControlHighlight'.
Error:(267, 5) No resource found that matches the given name: attr 'android:colorControlNormal'.
Error:(267, 5) No resource found that matches the given name: attr 'android:colorPrimary'.
Error:(267, 5) No resource found that matches the given name: attr 'android:colorPrimaryDark'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/Android/Sdk/build-tools/19.1.0/aapt'' finished with non-zero exit value 1

How can i solve this

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
anas p a
  • 383
  • 5
  • 20
  • seems to be an issue with your resource file.. did you try clean project.. – Chandan Nov 27 '15 at 11:39
  • yes, still same issue – anas p a Nov 27 '15 at 11:40
  • As your targetSdkVersion is 19, you can delete `values-v21` folder in res directory. Then clean and build your project. – Uniruddh Nov 27 '15 at 11:41
  • Also if you are trying to use `Material` Theme make sure, you have followed this guide: http://developer.android.com/training/material/theme.html. Else consider changing theme for your project. – Uniruddh Nov 27 '15 at 11:43
  • i deleted the folder values-v21 and perform clean and build project but still here issues – anas p a Nov 27 '15 at 11:55

2 Answers2

4

Since you are using:

 compile 'com.google.android.gms:play-services:+'

you are adding the latest version which has a dependencies with

 <dependencies>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>support-v4</artifactId>
      <version>22.2.0</version>
      <scope>compile</scope>
      <type>aar</type>
    </dependency>
  </dependencies>

You can check the gms\play-services-basement\8.3.0 pom file.

It requires API 22 to compile the project then change the:

compileSdkVersion 22

Also I suggest you using the latest api 23

   compileSdkVersion 23
   buildToolsVersion "23.0.1"

and don't use the + in your dependencies.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
1

Whats your logcat throws

Error:(16) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.

Set the compile sdk version to 21 .

 compileSdkVersion 21
 buildToolsVersion '23.0.0'

And call

compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.google.android.gms:play-services:6.5.87'

Then click Apply -> click OK, clean and build project and run it.

Do not call compile 'com.android.support:support-v4:19.1.0'

Read Material Theme Setup

AppCompat v7 r21 returning error in values.xml?

Community
  • 1
  • 1
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198