Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/188.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 我应该在依赖项中使用哪个版本的appcompat?_Android_Android Studio_Android Support Library_Android Appcompat_Android Recyclerview - Fatal编程技术网

Android 我应该在依赖项中使用哪个版本的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

我正在使用最新版本的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'.

这些错误是在我使用新的依赖项时出现的

您应该使用与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当前为最新版本。