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
/.../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
I was able to resolve it by updating sdk version and tools in gradle
support library 26.0.1 https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-1
I had to change
compileSdkVersion = 26 and
buildToolsVersion = '26.0.1' in all my dependencies
Compile SDK Version
Build Tool Version
Target SDK Version
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+'
I hit this exact same error and was Googling all over trying to find what I’m doing wrong as that is generated build values-26 code and not styles that I provided. I tried everything from Gradle 4.0 to Android Studio preview 3.0 to canary channel, you name it.
I never found the answer online. In the end, I was able to go back to standard Dev Android Studio and 2.3.3 Gradle as I ended up accidentally fixing it :).
Turned out I was so focused on updating my library project that I was not noticing that the error was caused from an unused sub module (demo app) that is nested in my library project. Once I updated the sub module to match the 26 build tools and 26+ design and support libraries my problem went away.
Not sure if that is what you are seeing as well, but personally I was only updating the lib to release again so wasn’t caring about the sample app module, and the error sure appeared to be related to 26 sdk which I only touched in the lib module so wasn’t thinking to check the other one. So that was the problem all along for me. Hopefully that fixes you as well. I had this error in 2 library projects and it fixed it in both.
Goodluck either way and if this doesn’t resolve your issue, please share what did. BTW 26.0.01 build tools and 26.1.0 design and support is where I ended up going to in the end, although 26.0.1 worked fine as well.
I had this exact error and I realized the my
compileSdkVersion was set at
25 and my
buildToolsVersion was set at
So I just changed the
26 and synced the Gradle. it fixed the problem for me.
targetSDKVersion was also set as
This issue was caused by one of the libraries for me that needed version 26 for compilation.
Making the targetSdkVersion to 26 will cause other issues and you will have to tweak your app to adapt to the Oreo platform. This is not the correct solution for all.
Just making the
compileSdkVersion to 26 and
buildToolsVersion to 26.0.2 worked for me.
One should also update all of their support libraries to use 26.1.0 or later.
compileSdkVersion 26 targetSdkVersion 26 buildToolsVersion '26.0.2'
after updating your android studio to 3.0 ,if this error occurs just update the gradle properties ,
mine solve this issue….
Make sure you have Android SDK 8.0 on your development environment. I was having the same issue on my MAC and installing SDK 8.0 and its tools fixed it. I am having the same issue on Windows. I am downloading the SDK now.
Just clear your project and build again.
./gradlew app:clean app:assembleDebug
But it not works when targetSdkVersion or compileSdkVersion is 25.