code

AppCompat v7 r21이 values.xml에서 오류를 반환합니까?

starcafe 2023. 7. 27. 22:09
반응형

AppCompat v7 r21이 values.xml에서 오류를 반환합니까?

Android Studio를 때 ㅠㅠㅠㅠㅠㅠㅠㅠㅠcompile "com.android.support:appcompat-v7:21.0.0" Gradle 파일에 오류가 많이 발생했습니다.

C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Error:(36, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v14\values.xml
Error:(9, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Error:(9, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Error:(9, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Error:(9, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v21\values.xml
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Menu'.
Error:Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Subtitle'.
Error:Error retrieving parent for item: No resource found that matches the given name '@android:TextAppearance.Material.SearchResult.Title'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small.Inverse'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Subhead'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Title'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Large'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.PopupMenu.Small'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.ActionBar'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark.ActionBar'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Light'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.DropDownItem.Spinner'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.AutoCompleteTextView'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.PopupMenu'.
Error:(298, 21) No resource found that matches the given name: attr 'android:overlapAnchor'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'.
Error:(298, 21) No resource found that matches the given name: attr 'android:overlapAnchor'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Toolbar.Button.Navigation'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Dialog'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
Error:Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog'.
Error:(144, 21) No resource found that matches the given name: attr 'android:colorAccent'.
Error:(146, 21) No resource found that matches the given name: attr 'android:colorControlActivated'.
Error:(147, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'.
Error:(145, 21) No resource found that matches the given name: attr 'android:colorControlNormal'.
Error:(142, 21) No resource found that matches the given name: attr 'android:colorPrimary'.
Error:(143, 21) No resource found that matches the given name: attr 'android:colorPrimaryDark'.
Error:(144, 21) No resource found that matches the given name: attr 'android:colorAccent'.
Error:(146, 21) No resource found that matches the given name: attr 'android:colorControlActivated'.
Error:(147, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'.
Error:(145, 21) No resource found that matches the given name: attr 'android:colorControlNormal'.
Error:(142, 21) No resource found that matches the given name: attr 'android:colorPrimary'.
Error:(143, 21) No resource found that matches the given name: attr 'android:colorPrimaryDark'.
Error:(144, 21) No resource found that matches the given name: attr 'android:colorAccent'.
Error:(146, 21) No resource found that matches the given name: attr 'android:colorControlActivated'.
Error:(147, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'.
Error:(145, 21) No resource found that matches the given name: attr 'android:colorControlNormal'.
Error:(142, 21) No resource found that matches the given name: attr 'android:colorPrimary'.
Error:(143, 21) No resource found that matches the given name: attr 'android:colorPrimaryDark'.
Error:(144, 21) No resource found that matches the given name: attr 'android:colorAccent'.
Error:(146, 21) No resource found that matches the given name: attr 'android:colorControlActivated'.
Error:(147, 21) No resource found that matches the given name: attr 'android:colorControlHighlight'.
Error:(145, 21) No resource found that matches the given name: attr 'android:colorControlNormal'.
Error:(142, 21) No resource found that matches the given name: attr 'android:colorPrimary'.
Error:(143, 21) No resource found that matches the given name: attr 'android:colorPrimaryDark'.

이 모든 것은 다음과 같습니다.

\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml

그리고.

\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v21\values.xml

AppCompat v21은 API 21(Android 5.0)에서 제공하는 새로운 API가 필요한 테마를 구축합니다.AppCompat으로 응용 프로그램을 컴파일하려면 API 21을 기반으로 컴파일해야 합니다./빌드를 21입니다.compileSdkVersion21 a 리고a.buildToolsVersion21.0.1(이 시점에서 가장 높은 수치이며 항상 최신 빌드 도구를 사용하려는 경우).

프로젝트 폴더와 appcompat_v7 폴더의 project.properties 파일에서 대상(대상 안드로이드 버전을 알려주는) 값이 동일한지 확인합니다(최신인 것이 좋습니다).

'your_project'project.properties 내부

target=android-21 android.library.reference.1=../appcompat_v7

그리고.

appcompat_v7/project.properties 내부

target=android-21 android.library=true

그리고 이 후에는 프로젝트를 청소하는 것을 잊지 마십시오.

compile 'com.android.support:appcompat-v7:21.0.0'안으로compile 'com.android.support:appcompat-v7:20.0.0'를 할 .나를 위해 작품을 만듭니다.

Android studio를 사용하는 경우 File --> Properties 탭에서 Project Structure로 이동하여 Compile Sdk Version을 AP121로, Build Tools Version을 사용 가능한 가장 높은 버전으로 변경합니다.그런 다음 Refresh Gradle

complete SDK 버전을 API 레벨 21로 변경하여 해결했습니다. 그리고 나서 나는 내 장치에 앱을 배포하는 다른 문제들과 마주쳤습니다.나는 미니문 API 레벨을 내가 원하는 것으로 변경했고 그것을 고쳤습니다.

누군가 다시 이런 일을 겪게 될 경우를 대비해서 말입니다.

컴파일할 대상 API 레벨을 21로 선택하고 적용 -> 확인을 클릭한 후 프로젝트를 정리 및 빌드하고 실행합니다.

Screenshot for same

내 솔루션은 다른 버전과 컴파일되어 있습니다.

build.gradle(앱)

compileSdkVersion 21

행운을 빌어요

컴파일 SDK를 23으로 변경합니다.이것으로 해결되었습니다.

저는 저처럼 해결할 수 있는 사람에게 투표합니다.저도 당신과 같은 문제가 있었습니다. 저는 정답을 맞추기 위해 많은 시간을 보냈습니다. 테스트해 주세요.

전체 SDK를 업그레이드하십시오. 업데이트 21.0.2 빌드에도 Google 서비스 재생의 업데이트가 있습니다. 모두 업그레이드하십시오.작업영역에서 폴더( Android - support - v7 - AppCompat ) 및 (google - play - services_lib )를 삭제합니다.

이러한 프로젝트를 IDE로 다시 가져온 후 선택하여 작업 영역에 다시 복사합니다.

새로 고침 및 빌드 작업을 수행하는 프로젝트(google - play - services_lib)

***** 문제 프로젝트(안드로이드 - 지원 - v7 - AppCompat)는 5.0 API를 표시한 다음 새로 고침 및 빌드를 수행합니다.

그의 프로젝트에서 안드로이드 속성에서 라이브러리(안드로이드 -support - v7 - AppCompat)와 (구글 -play - services_lib)를 가져온 다음 새로 고침 및 빌드를 수행합니다.

API 21을 사용하지 않으려면 이전 버전의 앱 압축 라이브러리를 사용하고, 업데이트하지 않고 이전 앱 압축 라이브러리를 사용하면 됩니다.

다음 단계를 수행하면 이를 달성할 수 있습니다.

다운로드한 버전의 완전한 sdk 및 eclipse 번들을 추출합니다.

를 appCompact에서 가져오기만 하면 .sdk\extras\android\support\v7\appcompact

이제 당신은 끝났습니다.

build.gradle(모듈: 앱)을 업데이트했습니다.이전 코드:

  compile 'com.android.support:appcompat-v7:23.0.1'

새 코드:

 compile 'com.android.support:appcompat-v7:22.2.0'

안드로이드 스튜디오에서 일합니다.

Resource for android 이동때사옵가될션것다입니이능으로 하면 옵션이 됩니다.sdk manager를 선택합니다.Android 5.0다운로드하여 설치합니다.이렇게 하면 리소스를 찾을 수 없는 문제가 해결됩니다.

하세요, 저도 . 저도 같은 오류를 겪고 있었습니다.appcompatv7라이브러리와 저는 @ianhannibalake가 제안한 대로 했고, 라이브러리를 선택하고 마우스의 보조 버튼으로 클릭하여 라이브러리의 빌드 버전을 확인했습니다.

Properties -> Android -> Android 5.0.1 api level 21

그리고 나서 모든 프로젝트를 청소했지만 운이 없었습니다. 그래서 모든 희망을 잃은 후에 저는 이클립스 케플러에서 이클립스 루나로 업그레이드하기로 결정했습니다.

다운로드가 완료되기를 기다리는 동안.것을 했습니다.appcompatv7 도서관을 했습니다.

디스크에서 프로젝트 내용을 삭제합니다.

업데이트가 있는지 확인하기 위해 Android SDK를 연 다음 프로젝트를 선택하여 프로젝트에서 모든 라이브러리 참조를 제거했습니다.

Project -> Properties -> Android -> Library 섹션

이 모든 문제를 시작한 라이브러리를 포함한 모든 라이브러리를 제거했습니다.

Google_Play_Services_Lib

그런 다음 Eclipse를 다시 시작하고 Android SDK에서 복사했습니다.폴더 appcompat 원본:

Android-vmx-linux/랩톱/랩톱/지원/v7

내 eccles 작업영역으로 가져온 다음 작업영역의 기존 프로젝트 가져오기에서 Eclipse로 다시 가져온 다음 적절한 빌드 도구 버전을 선택합니다.

Android 5.0.1 API 21

그리고 모든 참조 라이브러리를 추가하고 모든 프로젝트를 정리하고 모든 작업을 다시 수행했습니다.

모든 참조 라이브러리에 대해 동일한 빌드 도구를 선택합니다.

이것이 도움이 되길 바랍니다!!!!

그나저나 저는 투표를 하려고 했지만 그것을 할 충분한 대표자가 없었습니다.

여기에 구글 플레이 서비스를 추가하는 것을 확인하세요. 저는 같은 문제에 직면했고 모든 것을 제거한 다음 단계를 따라 모든 것이 작동했습니다.

같은 문제가 발생하여 build.gradle compileSdkVersion 21, targetSdkVersion 21빌드에서 올바른 API 수준 값을 얻었습니다.도구 버전 21.0.1

하지만 프로젝트에 이것을 모듈로 포함하고 있어서 다른 모듈 Gradle 설정이 API 21과 일치하는지 확인해야 했습니다.그 후에 모든 것이 저에게 효과가 있었습니다.

나는 변했어요

compile 'com.android.support:appcompat-v7:19.1.+'

안으로

compile 'com.android.support:appcompat-v7:22.1.+'

build.gradle 및 동기화 후 오류가 발생하지 않았습니다.

Eclipse IDE의 경우에도 동일한 문제가 발생했으며 해결책은 다음과 같습니다.
1 - 최신 API(SDK Platform & Google API) 설치
2- 다음 설정을 사용하여 프로젝트를 만듭니다.

  • 컴파일 대상: 현재 사용 가능한 최신 API 버전 사용
  • 다른 값은 사용자의 요구 사항에 따라 값을 받을 수 있습니다(이전 주석에서 각 값의 의미 참조).

나의 경우는 다음과 같습니다.

android {
compileSdkVersion 21
buildToolsVersion '23.0'

defaultConfig {
    applicationId "nl.changer.polypickerdemo"
    minSdkVersion 15
    targetSdkVersion 21
---------
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'


}

수정했습니다: compileSdkVersion 21 빌드Tools 버전 '23.0' appcompat-v7:22.2.0'

Analytics를 구현하기 위해 Google-services.json 파일을 가져왔을 때 이 문제에 직면했습니다.이미 xml 폴더에 global_tracker.xml 파일이 있습니다.빌드하는 동안 Google-services.json 파일의 콘텐츠를 병합하는 동안 오류가 발생하기 시작했습니다.당분간은 goolgle-services.json 파일을 제거한 후 오류가 해결됩니다.이전 Analytics 솔루션을 사용합니다.

마지막으로 편집/가져온 XML 또는 Json 파일을 확인하면 오류가 발생할 수 있습니다.그것이 제 경우에 도움이 되었습니다.

도움이 되었습니다.

  • Android SDK를 최신 버전으로 업데이트합니다.
  • 갱신하다app/build.gradle최신 구성 요소 포함:

    compileSdkVersion 25  
    buildToolsVersion "25.0.2"  
    minSdkVersion 17  
    targetSdkVersion 25
    

이것이 당신의 문제를 해결하기를 바랍니다.

이것은 저에게 아주 잘 맞습니다.Android-support-v7-appcompat 프로젝트로 이동하여 "project.properties" 파일을 열고 누락된 경우 다음 행을 삽입합니다.

target=android-25
compile=android-21

저는 제 폰갭 프로젝트 중 하나에 대해서도 같은 문제에 직면하고 있었습니다.이 문제를 해결하기 위해 다음 단계를 수행했습니다.

프로젝트 이름(내 경우 Android)을 마우스 오른쪽 버튼으로 클릭하고 "모듈 설정 열기"를 선택합니다.

모듈 선택(안드로이드 및 CordovaLib)

맨 위에서 속성 클릭

컴파일 SDK 버전 선택 (API 26: Android 8.0 선택)

빌드 도구 버전 선택(26.0.2 선택)

소스 호환성(1.6)

대상 호환성(1.6)

확인을 클릭하고 프로젝트를 다시 빌드합니다.

또한 한 단계 더 추가

더하다

com.dll을 컴파일합니다.지원:appcompat-v7:27.0.2'

build.gradle(모듈:안드로이드)

다음 링크에는 수행한 단계에 대한 설정이 표시됩니다.

https://app.box.com/s/itkkjz09wgy36jwowhvzcyx6fp7o2gkh

언급URL : https://stackoverflow.com/questions/26457096/appcompat-v7-r21-returning-error-in-values-xml

반응형