我正在使用最新版本的appcompat。這是我的依賴關係:我應該在依賴關係中使用什麼版本的appcompat?
dependencies {
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:21.0.0'
}
當我重建項目中,我得到了這些錯誤:
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'.
問題是什麼?我該如何解決它?
編輯: 新的依賴(recyclerview-v7:23.0.0'
)和錯誤與它一起:
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'.
這些錯誤是當我使用了新的依賴
感謝您的答覆,但現在我得到這個錯誤:F:\ AndroidStudioProjects \ recycleView \程序\編譯\ \中間體爆炸-AAR \ com.android.support \程序兼容性-V7 \ 23.0.0 \水庫\值-v21 \ values-v21.xml – navidjons
@navidjons請更新您的文章並顯示更詳細的錯誤日誌。 – hata
感謝您的回覆,我做到了 – navidjons