Android 我应该在依赖项中使用哪个版本的appcompat?
我正在使用最新版本的appcompat。这是我的依赖项:Android 我应该在依赖项中使用哪个版本的appcompat?,android,android-studio,android-support-library,android-appcompat,android-recyclerview,Android,Android Studio,Android Support Library,Android Appcompat,Android Recyclerview,我正在使用最新版本的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
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'.
这些错误是在我使用新的依赖项时出现的您应该使用与appcompat相同的版本,用于
RecyclerView
。所以
dependencies {
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
}
可以使用。对于
回收视图
,您应该使用与appcompat相同的版本。所以
dependencies {
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
}
会有用的。试试这个
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:recyclerview-v7:22.0.0'
我不确定是否有v7:23+可用于recyclerview试试这个
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:recyclerview-v7:22.0.0'
我不确定是否有可用于recyclerview的v7:23+,您应该始终使用相同级别的支持库 例如,最好使用最新版本。目前
dependencies {
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
}
如果您使用的是支持库v23,则必须使用API23编译项目
compileSdkVersion 23
在build.gradle
中,将compileSdkVersion
更改为23
compileSdkVersion 23
您应该始终使用具有相同级别的支持库 例如,最好使用最新版本。目前
dependencies {
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
}
如果您使用的是支持库v23,则必须使用API23编译项目
compileSdkVersion 23
在build.gradle
中,将compileSdkVersion
更改为23
compileSdkVersion 23
感谢您的回复,但现在我收到了以下错误:F:\AndroidStudioProjects\recycleView\app\build\intermediates\exploded aar\com.android.support\appcompat-v7\23.0.0\res\values-v21\values-v21。xml@navidjons请更新您的帖子并显示更详细的错误日志。@navidjons请确保您已下载了附加内容。感谢您的回复,但现在我收到了以下错误:F:\AndroidStudioProjects\recycleView\app\build\intermediates\exploded aar\com.android.support\appcompat-v7\23.0.0\res\values-v21\values-v21。xml@navidjons请更新您的帖子并显示更详细的错误日志。@navidjons请确保您已下载了附加内容。recyclerview-v7:23当前为最新版本。recyclerview-v7:23当前为最新版本。