找不到与给定名称匹配的资源:attr 'android:keyboardNavigationCluster

No resource found that matches the given name: attr #39;android:keyboardNavigationCluster#39;. when updating to Support Library 26.0.0(找不到与给定名称匹配的资源:attr android:keyboardNavigationCluster.更新到支持库 26.0.0 时) - IT屋-程序员软
本文介绍了找不到与给定名称匹配的资源:attr 'android:keyboardNavigationCluster'.更新到支持库 26.0.0 时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我在更新到最新的支持库版本 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错误:(15, 21) 找不到与给定名称匹配的资源:attr 'android:keyboardNavigationCluster'.错误:(18, 21) 找不到与给定名称匹配的资源:attr 'android:keyboardNavigationCluster'.错误:(15, 21) 找不到与给定名称匹配的资源:attr 'android:keyboardNavigationCluster'.错误:(18, 21) 找不到与给定名称匹配的资源:attr 'android:keyboardNavigationCluster'.错误:任务:app:processBetaDebugResources"执行失败.

<块引用>

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

文件来自支持库:

<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></风格>

我们使用以下版本:

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

<小时>

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

有什么想法吗?

解决方案

我可以通过更新 gradle 中的 sdk 版本和工具来解决它compileSdkVersion 26buildToolsVersion "26.0.1"

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

I've got this issue while updating to the latest Support Library version 26.0.0 (https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0):

Error:(18, 21) No resource found that matches the given name: 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: Failed to execute aapt

The file is from the support library:

<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>

We're using the following versions:

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

Any ideas?

解决方案

I was able to resolve it by updating sdk version and tools in gradle compileSdkVersion 26 buildToolsVersion "26.0.1"

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

这篇关于找不到与给定名称匹配的资源:attr 'android:keyboardNavigationCluster'.更新到支持库 26.0.0 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Android release APK crash with java.lang.AssertionError: impossible in java.lang.Enum(Android 发布 APK 因 java.lang.AssertionError 崩溃:在 java.lang.Enum 中不可能)
Finished with Non Zero Exit Value 3(以非零退出值 3 结束)
On gradle:3.0.0 More than one file was found with OS independent path #39;META-INF/ASL2.0#39;(在 gradle:3.0.0 上找到多个文件,其独立于操作系统的路径为“META-INF/ASL2.0)
Android : app loading library at runtime on Lollipop but not IceCreamSandwich(Android:运行时在 Lollipop 上而不是 IceCreamSandwich 上的应用程序加载库)
buildConfigField depending on flavor + buildType(buildConfigField 取决于风味 + buildType)
How do I suppress warnings when compiling an android library with gradle?(使用 gradle 编译 android 库时如何抑制警告?)