首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >找不到与给定名称匹配的资源: attr 'android:keyboardNavigationCluster‘。当更新为支持库26.0.0时

找不到与给定名称匹配的资源: attr 'android:keyboardNavigationCluster‘。当更新为支持库26.0.0时
EN

Stack Overflow用户
提问于 2017-07-25 18:53:04
回答 26查看 143.3K关注 0票数 215

我在更新到最新的支持库版本26.0.0 (https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0)时遇到此问题:

错误:(18,21)找不到与给定名称匹配的资源: attr 'android:keyboardNavigationCluster‘。

/.../app/build/intermediates/res/merged/beta/debug/values-v26/values-v26.xml
Error:(15, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:(18, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:(15, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:(18, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Error:Execution failed for task ':app:processBetaDebugResources'.

com.android.ide.common.process.ProcessException:无法执行aapt

该文件来自support库:

<style name="Base.V26.Widget.AppCompat.Toolbar" parent="Base.V7.Widget.AppCompat.Toolbar">
    <item name="android:touchscreenBlocksFocus">true</item>
    <item name="android:keyboardNavigationCluster">true</item>
</style>

我们使用以下版本:

ext.COMPILE_SDK_VERSION = 26
ext.BUILD_TOOLS_VERSION = "26.0.1"

ext.MIN_SDK_VERSION = 17
ext.TARGET_SDK_VERSION = 26
ext.ANDROID_SUPPORT_LIBRARY_VERSION = "26.0.0"
ext.GOOGLE_PLAY_SERVICES_LIBRARY_VERSION = "11.0.2"

compile 'com.android.support:appcompat-v7:' + ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.android.support:design:' + ANDROID_SUPPORT_LIBRARY_VERSION
compile 'com.android.support:recyclerview-v7:' + ANDROID_SUPPORT_LIBRARY_VERSION

有什么想法吗?

EN

回答 26

Stack Overflow用户

回答已采纳

发布于 2017-07-26 01:36:40

我能够通过更新sdk版本和gradle compileSdkVersion 26 buildToolsVersion "26.0.1"中的工具来解决这个问题。

support library 26.0.1 https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-1

票数 315
EN

Stack Overflow用户

发布于 2017-08-19 14:50:05

更改编译SDK版本:

compileSdkVersion 26

构建工具版本:

buildToolsVersion "26.0.1"

目标SDK版本:

targetSdkVersion 26

依赖关系:

compile 'com.android.support:appcompat-v7:26+'
compile 'com.android.support:design:26+'
compile 'com.android.support:recyclerview-v7:26+'
compile 'com.android.support:cardview-v7:26+'

同步Gradle。

票数 52
EN

Stack Overflow用户

发布于 2017-07-26 16:26:47

我必须更改所有依赖项build.gradle文件中的compileSdkVersion = 26buildToolsVersion = '26.0.1'

票数 35
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45301203

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档