AppCompat v7 R21 возвращает ошибку в значениях.xml?
Я использую Android Studio и когда я добавляю compile "com.android.support:appcompat-v7:21.0.0" в мой файл Gradle, я получаю тонну ошибок:
C:UsersWindowsSucksAndroidStudioProjectsMMMedsappbuildintermediatesexploded-aarcom.android.supportappcompat-v7.0.0resvalues-v11values.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:UsersWindowsSucksAndroidStudioProjectsMMMedsappbuildintermediatesexploded-aarcom.android.supportappcompat-v7.0.0resvalues-v14values.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:UsersWindowsSucksAndroidStudioProjectsMMMedsappbuildintermediatesexploded-aarcom.android.supportappcompat-v7.0.0resvalues-v21values.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'.
все это, кажется, появляется в:
appbuildintermediatesexploded-aarcom.android.supportappcompat-v7.0.0resvalues-v11values.xml
и
appbuildintermediatesexploded-aarcom.android.supportappcompat-v7.0.0resvalues-v21values.xml
23 ответов:
AppCompat v21 создает темы, которые требуют новых API, предоставляемых в API 21 (Android 5.0). Чтобы скомпилировать приложение с помощью AppCompat, необходимо также выполнить компиляцию по API 21. Рекомендуемая настройка для компиляции / построения с API 21-это
compileSdkVersionна21иbuildToolsVersionна21.0.1(который является самым высоким в настоящее время - вы всегда хотите использовать последние инструменты сборки).
убедитесь, что значение цель (что говорит о целевой версии android) в .свойства на иваша папка проекта и appcompat_v7 папка такая же (желательно последняя).
: внутри 'your_project' / project.свойства
target=android-21 android.library.reference.1=../appcompat_v7и
: внутри appcompat_v7 / project.свойства
target=android-21 android.library=trueи после этого не забудьте очистить ваш проект .
изменение
compile 'com.android.support:appcompat-v7:21.0.0'наcompile 'com.android.support:appcompat-v7:20.0.0'в gradle.построить работает для меня.
Если вы используете android studio goto Файл - > Структура Проекта В свойства изменить скомпилировать версию Sdk до AP1 21 и построить инструменты версии до самой высокой доступной версии. А затем обновить Gradle
изменение версии Complie SDk на уровень API 21 исправлено для меня. затем я столкнулся с другими проблемами развертывания приложения на моем устройстве. я изменил уровень API minimun для таргетинга на то, что я хочу, и это исправило его.
Если кто-то испытывает это снова.
просто выберите целевой уровень api для 21 для компиляции, нажмите кнопку применить -> нажать ОК,очистить и build и run его.
Я голосую за тех, кто может решить, как я. У меня была такая же проблема , как и у вас, я потратил много часов, чтобы исправить . Пожалуйста, проверьте .
обновление всего SDK, обновление 21.0.2 build также имеет обновления от Google Services play . Обновите все. В рабочем пространстве удалять папки ( Android-поддержка - В7 - по совместимости приложений ) и ( Гугл-Плей - services_lib )
повторно импортируйте эти проекты в IDE и выберите, чтобы скопировать их в рабочую область снова.
проект ( google-play-services_lib ) для выполнения действия обновления и сборки
**** ***** проблема Проект (android-support - v7 - AppCompat ) отметьте API 5.0, затем обновите и постройте .
в своем проекте , в свойствах , android , импортировать библиотеки ( android-support - v7 - AppCompat ) и (google-play - services_lib ) затем обновить и построить .
Если вы не хотите использовать API 21, Вы можете использовать более старую версию библиотеки appcompact, используйте более старую библиотеку app compact без ее обновления.
вы можете достичь этого, просто выполнив следующие шаги:
1) извлеките загруженную версию полного пакета sdk и eclipse bundle.
2) просто импортируйте библиотеку appCompact из
sdk\extras\android\support\v7\appcompactтеперь вы закончили.
цитирую здесь:
чтобы решить эту проблему,
- Правой Кнопкой Мыши на
appcompat_v7библиотека и выберите пункт Свойства- Теперь, нажмите на Android вариант,
- установить путь сборки проекта как Android 5.0 (уровень API 21)
- Применить Изменения.
- теперь переходим к под
appcompat_v7библиотека- установить цель проекта :
target=android-21- Теперь Чистый + Построить библиотеку appcompat_v7 и ваши проекты
я обновил сборку.gradle (модуль: приложение): Старый Код:
compile 'com.android.support:appcompat-v7:23.0.1'Новый Код:
compile 'com.android.support:appcompat-v7:22.2.0'работает для меня в android studio.
Resource for androidбудет опция доступна, когда вы идете в вашsdk managerи выберитеAndroid 5.0. Загрузите и установите это. Это позволит решить проблему ресурса не найден.
Привет там у меня была та же ошибка с участием
appcompatv7библиотека, и я сделал, как предложил @ianhanniballake, и проверил версию сборки библиотеки, выбрав ее и щелкнув вторичной Кнопкой Мыши:свойства - > Android - > Android 5.0.1 api level 21
затем очистите все проекты, но мне не повезло, поэтому, потеряв все свои надежды, я решил перейти с Eclipse Kepler на Eclipse Луна.
пока я ждал завершения загрузки. Я решил попробовать другую вещь, поэтому я пошел и удалил из eclipse
appcompatv7библиотеки и проверилудалить содержимое проекта на диске.
открыл Android SDK, чтобы проверить, были ли какие-либо обновления, затем я удалил все ссылки на библиотеку из своего проекта, выбрав мой проект и под
Проект - > Свойства - > Android - > Библиотека раздел
удалены все библиотеки, включая ту, с которой началась вся эта проблема
Google_Play_Services_Lib
затем перезапустил Eclipse и скопировал из Android SDK.В совместимости приложений папку:
android-sdk-linux / extras / android / support / v7
на мой eclpse рабочей области, затем импортировал его в Eclipse в Аган от проекта существующие импортировать в рабочую область, а затем выбрать правильное построение версия инструмента
Android 5.0.1 api 21
и добавил Все мои справочные библиотеки, очистил все проекты и сделал все, чтобы снова работать.
Я выбираю для всех моих справочных библиотек один и тот же инструмент сборки.
надеюсь, что это помогает!!!!
кстати, я пытался дать голос, но у меня не было достаточно репутации, чтобы сделать это.
Проверьте добавление сервисов google play здесь поскольку я столкнулся с той же проблемой и удалил все, затем последовал шагам и все заработало.
Я столкнулся с той же проблемой и имел правильные значения уровня API в моей сборке.gradle compileSdkVersion 21, targetSdkVersion 21 и buildToolsVersion 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 и API-интерфейсов)
2-создайте проект со следующими настройками:
- Compile With: используйте последнюю версию 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 buildToolsVersion '23.0' appcompat-v7: 22.2.0'
Я столкнулся с этой проблемой, когда импортировал google-сервисы.JSON-файл для реализации аналитики. У меня уже был global_tracker.xml-файл в папке xml. Во время сборки, при слиянии содержимого из google-сервисов.файл json, ошибка была запущена происходит. В настоящее время ошибка устраняется после удаления goolgle-services.файл json. И используя старое аналитическое решение.
Проверьте последний файл XML или Json, который вы редактировали/импортировали, и, возможно, вы будете там ошибаться. Вот что помогло в моем случае.
ЭТО ПОМОГЛО МНЕ
- обновление Android SDK до последней версии
обновление
app/build.gradleС последней компоненты:compileSdkVersion 25 buildToolsVersion "25.0.2" minSdkVersion 17 targetSdkVersion 25надеюсь, что это решит вашу проблему
это работает очень хорошо для меня. Перейдите в проект android-support-v7-appcompat и откройте файл "project.свойства " и вставить эту строку, если она отсутствует:
target=android-25 compile=android-21
Я столкнулся с той же проблемой для одного из моих проектов phonegap. Чтобы решить эту проблему я последовал, следующий шаг
1) Щелкните правой кнопкой мыши на имя проекта (в моем случае android), выберите "Открыть Настройки модуля"
2) Выберите модули (android и CordovaLib)
3) нажмите Свойства сверху
4) выбрал версию Compile SDK (я выбрал API 26: Android 8.0)
5) выберите версию Build Tools (я выбрал 26.0.2)
6) Совместимость С Источниками (1.6)
7) Целевая Совместимость (1.6)
Нажмите кнопку ОК и перестроить проект.
еще один дополнительный шаг
добавить
compile ' com.андроид.поддержка: appcompat-v7: 27.0.2'
построить.gradle (модуль:android)
следующая ссылка показывает Мои настройки для шага я следовал

Comments