android - support - AppCompat v7 r21 retornando erro em valores.xml?
support version 28 (16)
Alterando compile 'com.android.support:appcompat-v7:21.0.0'
para compile 'com.android.support:appcompat-v7:20.0.0'
em gradle.build funciona para mim.
Eu estou usando o Android Studio e quando eu adiciono compile "com.android.support:appcompat-v7:21.0.0"
ao meu arquivo Gradle, estou recebendo uma tonelada de erros:
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'.
Tudo isso parece estar aparecendo em:
\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
e
\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v21\values.xml
Basta selecionar o nível da API de destino para 21 para compilação, clique em Aplicar -> clique em OK , limpe e construa o projeto e execute -o.
Citando here :
Para resolver esse problema,
- Clique com o
appcompat_v7
direito na bibliotecaappcompat_v7
e selecione Propriedades- Agora, clique na opção Android,
- Definir Caminho de Construção do Projeto como Android 5.0 (API level 21)
- Aplicar mudanças.
- Agora vá para o arquivo
project.properties
sob a bibliotecaappcompat_v7
,- Definir o alvo do projeto como:
target=android-21
- Agora Limpe + Construa a biblioteca appcompat_v7 e seus projetos
Eu atualizei o build.gradle (Módulo: app): Código Antigo:
compile 'com.android.support:appcompat-v7:23.0.1'
Novo Código:
compile 'com.android.support:appcompat-v7:22.2.0'
Funciona para mim no estúdio android.
Eu estava enfrentando esse problema quando importei o arquivo google-services.json para implementar o Google Analytics. Eu já tinha o arquivo global_tracker.xml na pasta xml. Durante a compilação, ao mesclar o conteúdo do arquivo google-services.json, o erro foi iniciado. Por enquanto, o erro é resolvido após a remoção do arquivo goolgle-services.json. E usando a solução mais antiga do Google Analytics.
Verifique o último arquivo XML ou Json que você editou / importou e talvez você tenha um erro de arquivo. Isso é o que ajudou no meu caso.
Eu estava enfrentando o mesmo problema para um dos meus projetos phonegap. Para resolver isso eu segui, seguindo o passo
1) Clique com o botão direito do mouse no nome do projeto (no meu caso android), selecione "Abrir configurações do módulo"
2) Selecione os módulos (android e CordovaLib)
3) Clique nas propriedades na parte superior
4) Escolha a versão do SDK Compile (eu escolhi API 26: Android 8.0)
5) Escolha Build Tools Version (eu escolhi 26.0.2)
6) Compatibilidade de Fonte (1.6)
7) Compatibilidade de alvo (1.6)
Clique em Ok e reconstruir o projeto.
Também mais um passo adicional
Adicionar
compile 'com.android.support:appcompat-v7:27.0.2'
build.gradle (módulo: android)
O link a seguir mostra minha configuração para o passo que eu segui
Isso funciona muito bem para mim. Vá para o projeto android-support-v7-appcompat e abra o arquivo "project.properties" e insira as linhas, se ausentes:
target=android-25
compile=android-21
Mude o seu compilar sdk para 23. Isso corrigiu para mim.
O AppCompat v21 constrói temas que exigem as novas APIs fornecidas na API 21 (Android 5.0). Para compilar sua aplicação com AppCompat, você deve também compilar com API 21. A configuração recomendada para compilar / construir com API 21 é um compileSdkVersion
de 21
e um buildToolsVersion
de 21.0.1
(que é o mais alto neste momento - você sempre quer use as ferramentas de compilação mais recentes).
Oi eu estava tendo o mesmo erro envolvendo a biblioteca appcompatv7
e eu fiz como @ianhanniballake sugeriu e verifiquei a versão de compilação da biblioteca, selecionando-a e dando um clique com o botão secundário do mouse então:
Propriedades -> Android -> Android 5.0.1 api level 21
então limpei todos os projetos, mas não tive sorte, então depois de perder todas as minhas esperanças, decidi atualizar do Eclipse Kepler para o Eclipse Luna.
Enquanto eu estava esperando o download ser concluído. Eu decidi tentar outra coisa, então eu fui e excluir do eclipse a biblioteca appcompatv7
e verifiquei o
Exclua o conteúdo do projeto no disco.
Abri o SDK do Android para verificar se havia alguma atualização, depois removi todas as referências de biblioteca do meu projeto selecionando meu projeto e sob
Projeto -> Propriedades -> Android -> seção Biblioteca
removido todas as bibliotecas, incluindo o que começou todo esse problema
Google_Play_Services_Lib
em seguida, reiniciei o Eclipse e copiei do Android SDK.A pasta appcompat de:
android-sdk-linux / extras / android / suporte / v7
Para o meu espaço de trabalho eclpse, em seguida, importei-o para o Eclipse a partir do projeto Import exsting no espaço de trabalho e, em seguida, escolha a versão da ferramenta propilar build
Android 5.0.1 api 21
e adicionei todas as minhas bibliotecas de referência, limpei todos os projetos e fiz tudo estava funcionando novamente.
Eu escolhi para todas as minhas bibliotecas de referência a mesma ferramenta de construção.
Espero que isto ajude!!!!
Pela maneira que eu tentei dar um voto, mas eu não tive o suficiente para fazê-lo.
Se você estiver usando o android goto, clique em Arquivo -> Estrutura do Projeto. Na guia Propriedades, altere a Versão do Sdk da Compilação para o AP1 21 e a Versão das Ferramentas de Criação para a versão mais alta disponível. E então Refresque Gradle
Se você não quiser usar a API 21, poderá usar a versão mais antiga da biblioteca appcompact, usar a biblioteca compacta do aplicativo antigo sem atualizá-la.
você pode conseguir isso simplesmente seguindo os passos:
1) Extraia a versão baixada do conjunto completo de sdk e eclipse.
2) Basta importar a biblioteca appCompact do sdk\extras\android\support\v7\appcompact
agora você está feito.
eu mudei
compile 'com.android.support:appcompat-v7:19.1.+'
para dentro
compile 'com.android.support:appcompat-v7:22.1.+'
no build.gradle e depois da sincronização eu não recebi nenhum erro
minha solucion é compilar com outra versão
build.gradle (app)
compileSdkVersion 21
Boa sorte
Resource for android
será uma opção disponível quando você vai para o seu sdk manager
e selecione Android 5.0
. Baixe e instale isso. Isso consertará o problema do recurso não encontrado.
Isso me ajudou
- Atualize o Android SDK para a versão mais recente
Atualize
app/build.gradle
com os componentes mais recentes:compileSdkVersion 25 buildToolsVersion "25.0.2" minSdkVersion 17 targetSdkVersion 25
Espero que isso resolva seu problema