티스토리 뷰
Stack Overflow에 자주 검색, 등록되는 문제들과 제가 개발 중 찾아 본 문제들 중에서 나중에도 찾아 볼 것 같은 문제들을 정리하고 있습니다.
Stack Overflow에서 가장 먼저 확인하게 되는 가장 높은 점수를 받은 Solution과 현 시점에 도움이 될 수 있는 가장 최근에 업데이트(최소 점수 확보)된 Solution을 각각 정리하였습니다.
아래 word cloud를 통해 이번 포스팅의 주요 키워드를 미리 확인하세요.
Error retrieving parent for item: No resource found that matches the given name after upgrading to AppCompat v23
항목의 상위 항목을 검색하는 동안 오류가 발생했습니다. AppCompat v23으로 업그레이드한 후 지정된 이름과 일치하는 리소스를 찾을 수 없습니다.
문제 내용
I've always programmed Android with Eclipse and decided to start migrating to Android Studio. I decided to use the same SDK I already had for Eclipse, then:
저는 항상 이클립스로 Android를 프로그래밍하고 Android Studio로 마이그레이션하기로 결정했습니다. Eclipse에 대해 이미 가지고 있던 동일한 SDK를 사용하기로 결정했습니다.
- Started a new project
- Set minimum SDK 4.0 (API Level 14)
- Choose Blank Activity option
- Used Default names for Activity Name and Layout Name
- Hit Finish
- 새 프로젝트 시작
- min SDK 4.0 설정(API 레벨 14)
- 빈 액티비티 옵션 선택
- 액티비티 이름 및 레이아웃 이름에 기본 이름 사용
- 문제 발생
After a few seconds Gradle finishes the build, and it throws me two errors with the following messages in file Teste4\app\build\intermediates/exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v23\values-v23.xml:
몇 초 후 Gradle이 빌드를 완료하고 Teste4\app\build\intermediates/exploded-aar\com.android.support\appcompat-v7\23.0.0\res\values-v23\values-v23.xml: 파일에 다음 메시지와 함께 두 가지 오류가 발생합니다.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Under File -> Project Structure -> Modules: app (left column) -> Properties tab, I have the following versions set up:
파일 -> 프로젝트 구조 -> 모듈: 앱(왼쪽 열) -> 속성 탭에서 다음 버전을 설정했습니다.
- "Compile Sdk Version": Android 5.1 (API Level 22)
- "Build Tools Version": 23.0.2
What should I do in order to fix this?
제가 이걸 고치려면 어떻게 해야 하나요?
I already tried what was suggested in Stack Overflow question appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable', but it didn't work.
스택 오버플로 질문 appcompat-v7:21.0.0': No resource found that match the given name: attr 'android:actionModeShareDrawable'에서 제안된 것을 이미 시도했지만 작동하지 않았습니다.
높은 점수를 받은 Solution
Your compile SDK version must match the support library's major version.
컴파일 SDK 버전이 서포트 라이브러리의 주 버전과 일치해야 합니다.
Since you are using version 23 of the support library, you need to compile against version 23 of the Android SDK.
서포트 라이브러리 버전 23을 사용하고 있으므로 Android SDK 버전 23에 대해 컴파일해야 합니다.
Alternatively you can continue compiling against version 22 of the Android SDK by switching to the latest support library v22.
또는 최신 서포트 라이브러리 v22로 전환하여 Android SDK 버전 22에 대해 컴파일을 계속할 수 있습니다.
가장 최근 달린 Solution
Your compile SDK version must match the support library major version. This is the solution to your problem. You can check it easily in your Gradle Scripts in build.gradle
file. Fx: if your compileSdkVersion
is 23 your compile library must start at 23.
컴파일 SDK 버전은 지원 라이브러리 주 버전과 일치해야 합니다. 이것이 귀하의 문제에 대한 해결책입니다. build.gradle 파일의 Gradle 스크립트에서 쉽게 확인할 수 있습니다. Fx: compileSdkVersion이 23이면 컴파일 라이브러리는 23에서 시작해야 합니다.
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 340
versionName "3.4.0"
}
dependencies {
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.0.1'
}
And always check that your Android Studoi has the supported API Level. You can check it in your Android SDK, like this:
Android Studoi에 지원되는 API 레벨이 있는지 항상 확인하십시오. 다음과 같이 Android SDK에서 확인할 수 있습니다.
출처 : https://stackoverflow.com/questions/32075498/error-retrieving-parent-for-item-no-resource-found-that-matches-the-given-name
'개발 > 안드로이드' 카테고리의 다른 글
컨텍스트로 레이아웃 인플레이터 가져오기 (0) | 2022.12.18 |
---|---|
웹뷰로 외부 웹 페이지 로드하기 (0) | 2022.12.18 |
캡처한 이미지 디바이스 방향에 맞게 회전시키기 (0) | 2022.12.18 |
소프트 키보드(SIP)가 뜰 때 뷰를 밀어 올리지 않게 하기 (0) | 2022.12.17 |
웹뷰에서 html 콘텐츠 가져오기 (0) | 2022.12.17 |