Reputation: 501
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
Upvotes: 0
Views: 1492
Reputation: 364654
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
Upvotes: 4
Reputation: 527
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
Upvotes: 0
Reputation: 12493
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.
Upvotes: 0