問題描述
我在更新到最新的支持庫版本 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'.錯誤:任務(wù):app:processBetaDebugResources"執(zhí)行失敗.
<塊引用>
com.android.ide.common.process.ProcessException: 無法執(zhí)行 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></風(fēng)格>
我們使用以下版本:
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 26
buildToolsVersion "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
這篇關(guān)于找不到與給定名稱匹配的資源:attr 'android:keyboardNavigationCluster'.更新到支持庫 26.0.0 時的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!