0

I'm using the latest version of appcompat. This is my dependencies:

dependencies {
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:recyclerview-v7:21.0.0'
}

When I rebuild the project, I got these errors:

 F:\AndroidStudioProjects\recycleView\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v17\values-v17.xml
    Error:(6, 21) No resource found that matches the given name: attr 'android:textAlignment'.
    Error:(10, 21) No resource found that matches the given name: attr 'android:paddingEnd'.
    Error:(10, 21) No resource found that matches the given name: attr 'android:paddingEnd'...........it goes for about 50 more lines 
    F:\AndroidStudioProjects\recycleView\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v23\values-v23.xml
    Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
    Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

What is the problem? How can I fix it?

EDIT: the new dependencies (recyclerview-v7:23.0.0') and errors along with it:

F:\AndroidStudioProjects\recycleView\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v17\values-v17.xml
    Error:(6, 21) No resource found that matches the given name: attr 'android:textAlignment'.
    Error:(10, 21) No resource found that matches the given name: attr 'android:paddingEnd'.
    Error:(10, 21) No resource found that matches the given name: attr 'android:paddingEnd'.
    Error:(13, 21) No resource found that matches the given name: attr 'android:paddingStart'.
    Error:(17, 21) No resource found that matches the given name: attr 'android:layout_marginEnd'.
    Error:(10, 21) No resource found that matches the given name: attr 'android:paddingEnd'.
    Error:(23, 21) No resource found that matches the given name: attr 'android:layout_marginStart'.
    Error:(26, 21) No resource found that matches the given name: attr 'android:layout_alignParentStart'.
 .....
    Error:(122, 21) No resource found that matches the given name: attr 'android:colorPrimary'.
    Error:(123, 21) No resource found that matches the given name: attr 'android:colorPrimaryDark'.
    F:\AndroidStudioProjects\recycleView\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v23\values-v23.xml
    Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
    Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

These errors are comes when I use the new dependencies

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
navidjons
  • 501
  • 4
  • 9
  • 15

3 Answers3

4

You should always use the support libraries with the same level.

For example it is a good idea to use the last version. Currently

dependencies {
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:recyclerview-v7:23.0.0'
}

If you are using the support libraries v23,you have to compile your project with API23.

In your build.gradle change the compileSdkVersion to 23.

  compileSdkVersion 23
Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
0

You should use the same version as appcompat for RecyclerView. So,

dependencies {
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:recyclerview-v7:23.0.0'
}

would work.

hata
  • 11,633
  • 6
  • 46
  • 69
  • Thanks for reply but now I get this error : F:\AndroidStudioProjects\recycleView\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v21\values-v21.xml – navidjons Aug 30 '15 at 04:43
  • @navidjons Please update your post and show more detailed error log. – hata Aug 30 '15 at 04:51
  • @navidjons Make sure you have downloaded extras. [Prerequirements](http://stackoverflow.com/a/26449172/3501958) – hata Aug 30 '15 at 05:23
0

Try this;

compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:recyclerview-v7:22.0.0'

I am not sure if there is a v7:23+ available for recyclerview

Want2bExpert
  • 527
  • 4
  • 11