주어진 이름과 일치하는 리소스를 찾을 수 없습니다 : 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
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를 실행하지 못했습니다
파일은 지원 라이브러리에서 가져옵니다.
<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
어떤 아이디어?
gradle에서 SDK 버전 및 도구를 업데이트하여 해결할 수있었습니다. compileSdkVersion 26
buildToolsVersion "26.0.1"
및 support library 26.0.1
https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-1
Compile 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.
나는 변화를 가지고 compileSdkVersion = 26
와 buildToolsVersion = '26.0.1'
내 종속성 모두 build.gradle
파일
내 반응 네이티브 프로젝트에서이 오류는에서 발생합니다 react-native-fbsdk
. react-native-fbsdk/android/build.gradle
다음을 업데이트하면 문제가 해결됩니다.
compileSdkVersion 26
buildToolsVersion "26.0.1"
나는이 똑같은 오류를 겪었고 내가 잘못하고있는 것을 찾으려고 노력했다. 빌드 값 -26 코드가 생성되었지만 스타일은 제공되지 않았다. Gradle 4.0에서 Android Studio preview 3.0, canary 채널에 이르기까지 모든 것을 시도했습니다.
온라인에서 답을 찾지 못했습니다. 결국 실수로 수정 한 표준 Dev Android Studio 및 2.3.3 Gradle로 돌아갈 수있었습니다. :)
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.
어느 쪽이든 행운을 빕니다. 그래도 문제가 해결되지 않으면 공유 한 내용을 공유하십시오. BTW 26.0.01 빌드 도구와 26.1.0 디자인 및 지원은 결국 26.0.1에서도 잘 작동했지만 결국 끝났습니다.
나는이 정확한 오류를했고 나는 내 실현 compileSdkVersion
에서 설정 한 25
내가 buildToolsVersion
설정 하였다 "26.0.1"
.
그래서 난 그냥 변경 compileSdkVersion
에 26
와 Gradle을을 동기화. 그것은 나를 위해 문제를 해결했습니다.
편집 : 내 targetSDKVersion
도 설정26
react-native-youtube 및 react-native-orientation에 대해 비슷한 오류가 있습니다.
해당 프로젝트의 build.gradle을 사용 compileSdkVersion 23
하지만 Feature : android : keyboardNavigationCluster가 api 26
(Android 8) 이후에 추가 되었다는 것을 알았습니다 .
어떻게 고칠까요?
이 문제를 쉽게 해결하는 한 가지 방법은 /android/build.gradle을 편집하고 (!!! NOT /android/app/build.gradle) 파일 하단에 해당 코드를 추가하는 것입니다.
이를 통해 하위 모듈에서 SDK 및 BuildTool-Version을 강제로 사용할 수 있습니다.
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
}
}
}
}
또한이 문제에 직면하여 두 가지만 변경하면됩니다.
파일 이름 : android / build.gradle 아래 코드에서 언급하십시오.
subprojects {
afterEvaluate {
project -> if (project.hasProperty("android")) {
android {
compileSdkVersion 26 buildToolsVersion '26.0.2'
}
}
}
}
파일 이름 : android / app / build.gradle 다음과 같이 compliesdk 버전과 buildToolVersion을 변경하십시오.
compileSdkVersion 26 buildToolsVersion "26.0.2"
그리고
dependencies {
compile 'com.android.support:appcompat-v7:26.0.2'
}
Ionic 2 프로젝트와 동일한 문제가 있었지만 문제를 해결하기 위해해야 할 일은
- "ionic_project_folder / platforms / android / project.properties"를여십시오.
- 변경 대상 = 안드로이드-25은 할 대상 = 안드로이드-26
- 운영
ionic build --release android
이것이 누군가를 돕기를 바랍니다!
//Adding this to the root build.gradle solved my problem, thanks @Yalamber
subprojects {
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
}
}
}
}
After updating your android studio to 3.0, if this error occurs just update the gradle properties, these are the settings which solved my issue:
compileSdkVersion 26
targetSdkVersion 26
buildToolsVersion '26.0.2'
when you try to change targetSDKVersion 26 to 25 that time occurred i was found solution of No resource found that matches the given name: attr 'android:keyboardNavigationCluster'. when updating to Support Library 26.0.0
Just Chage This code from Your Build.gradle
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.0.1'
}
}
}
}
to
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.2.0'
}
}
}
}
I updated my project app/build.gradle
to have
compileSDkVersion 26
buildToolsVersion '26.0.1'
However, the problem was actually with the react-native-fbsdk
package. I had to change the same settings in node_modules/react-native-fbsdk/android/build.gradle
.
In android studio,
right click on the project (since I had a Cordova project, I had CordovaLib and android: I selected android in my case),
- Select Open Module Settings
- In the Project Structure modal that pops up select the project in the modules section in the side panel (again android in my case)
- Click on the Dependencies tab
- Click on the green plus button in the top right corner
- Select Library Dependency
- Select app-compat-v7 from the dropdown
- Clean project and rebuild
I hit this recently and remember where it comes from. It's a mismatch between the Xamarin.Android.* version and the installed Android SDK version.
The current VS2017 15.5.3
new project defaults for nuGet Xamarin.Android.*
are 25.4.0.2
and the default VS install for cross platform development are the following Android SDK packages:
- Android
7.1
- Nougat- Android SDK Platform
25
- Google APIs Intel x86 Atom System Image
- Android SDK Platform
If you upgraded you solution nuGet for Xamarin.Android.*
to 26.1.0.1
then you will need to install the follow in the Android SDK:
- Android
8.0
- Oreo- Android SDK Platform
26
- Google APIs Intel x86 Atom System Image
- Android SDK Platform
I was facing the same issue for one of my PhoneGap project (Android studio 3.0.1). To resolve this I have followed, the following step
1) Right click on Project name (In my Case android), select "Open Module Settings"
2) Select modules (android and CordovaLib)
3) Click properties on top
4) Chose Compile SDK version (I have chosen API 26: Android 8.0 )
5) Choose Build Tools Version (I have chosen 26.0.2)
6) Source Compatibility ( 1.6)
7) Target Compatibility ( 1.6)
Click Ok and rebuild project.
The following link shows my setting for step I have followed
https://app.box.com/s/o11xc8dy0c2c7elsaoppa0kwe1d94ogh https://app.box.com/s/ofdcg0a8n0zalumvpyju58he402ag1th
I got this issue when compile react-native-fbsdk
I resolved this issue by change build.gradle
of react-native-fbsdk
from
compile('com.facebook.android:facebook-android-sdk:4.+')
to
compile('com.facebook.android:facebook-android-sdk:4.28.0')
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.
update these in gradle
compileSdkVersion 27 buildToolsVersion '27.0.1'
I resolved this issue by making some changes in build.gradle file
Changes in root build.gradle are as follows:
subprojects {
afterEvaluate {
project -> if (project.hasProperty("android")) {
android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
}
}
}
}
Changes in build.gradle are as follows:
compileSdkVersion 26
buildToolsVersion "26.0.1"
and
dependencies {
compile 'com.android.support:appcompat-v7:26.0.1'
}
For anyone using nativescript and facing this issue: you can add
compileSdkVersion 26
buildToolsVersion '26.0.1'
in App_Resources/Android/app.gradle (under android {
)
Then run tns platform remove android
and tns build android
in your project root.
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.
i had the same issue with ionic .
cordova platform remove android
cordova platform add android@6.4.0
And replace in platform/android/projet.properties
cordova.system.library.1=com.android.support:support-v4+
To
cordova.system.library.1=com.android.support:support-v4:26+
For this you have to do below things 1.right click the project click.
2.open module settings->in properties tab->change the compile sdk and build tool version into 26,26.0.0.
3.click ok.
Its working for me after an hour tried.
Just clear your project and build again.
./gradlew app:clean app:assembleDebug
But it not works when targetSdkVersion or compileSdkVersion is 25.
I solved this problem by doing the following:
compileSdkVersion 26
buildToolsVersion "26.0.1"
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'
'Programing' 카테고리의 다른 글
임시 디렉토리를 만드는 방법은 무엇입니까? (0) | 2020.04.28 |
---|---|
널을 뷰 루트로 전달하지 마십시오 (팽창 된 레이아웃의 루트 요소에서 레이아웃 매개 변수를 해결해야 함) (0) | 2020.04.28 |
bash에서 "group by"를 시뮬레이션하는 가장 좋은 방법은 무엇입니까? (0) | 2020.04.28 |
일반 사전에 대소 문자를 구분하지 않는 액세스 (0) | 2020.04.28 |
Heroku에서 Rails 서버를 다시 시작하는 방법? (0) | 2020.04.28 |