gradle - appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable' -
When trying to use the latest app-com-V7 support library in my project, I get the following error:
/Users/gregate/dev/mobile/android_project/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 resources found Matches the given name: attr 'android: actionModeShareDrawable' error: (36, 21) No resource found that matches the given name: attr 'android: actionModeShareDrawable'
How do I fix it?
Answer the answer in this detail exactly what I want and all of the IDE (Eclipse, IntellJ and Android Studios) Even though errors slightly differ.
Give solution / H2> to make sure that you have the latest additional
as well as Android 5.0 SDK
prerequirements < Downloaded via Code> SDK Manager.
Android Studio < / H2>
open build.gradle
to change the file in your application-module and your compileSdkVersion
21. This is basically necessary targetSdkVersion
SDK-version is not to replace 21 but it has been recommended because you always need
At the end you will see the grade-file as:
android {compileSdkVersion 21 // ... defaultConfig {//. .. targetSdkVersion 21}}
Be sure to sync your project later.
eclipse < / H2>
v7-appcompat
in the eclipse you have to use when using it as a library project to copy it to your * code / code * folder Not enough. Please read step-by-step tutorials on developer.android.com so how can the project be imported properly.
As soon as the project is imported, you realize that some folders in the / res
folder are red-underlined due to errors like:
error: receive parent for item Time error: No resource found that the person's name matches 'Android: TextAppearance.Material'. Error: Error retrieving parent for item: No resource found that matches given 'android: widgets. material. * 'Error: Error: No resource found that matches the given name: attr' android: actionModeShareDrawable '
solution
You only do one thing The project.properties
file from android-support-V7-appcompat
and target = android-19
to target = android-21 < Change the target from / code> Just project a later - - & gt; Clean ...
so that changes are effective.
IntelliJ IDEA (Do not use Gradle)
Eclipse equally it only Android-support-v7-appcompat.jar
; You will need to import appacket
as a module, read more about it. ( Note: If you are only using .jar
you will get NoClassDefFoundErrors
at runtime )
When you are trying to create this project, you will say something like the following: res / values-v **
folders your message window: / P>
Error: Android-APT-compiler: [Optpipe] Resource found that matches the given name: attr 'android: colorPrimary' error: (75, -1) android-apt- Compiler: [appcompat] C: \ [your path] \ SDK \ x Error in retrieving parent for item: No resource found, given name 'Android: Widget' Matches material. Right-click on the action button '// and so on
solution
appampate
module -> Open module setting (F4) -> Select the Android API 21 platform from the [Dependance tab] dropdown -> Apply
Then rebuild the project (build -> rebuilding project) and you are good to go.
additional
as well as Android 5.0 SDK
prerequirements < Downloaded via Code> SDK Manager.
Android Studio < / H2>
open build.gradle
to change the file in your application-module and your compileSdkVersion
21. This is basically necessary targetSdkVersion
SDK-version is not to replace 21 but it has been recommended because you always need
At the end you will see the grade-file as:
android {compileSdkVersion 21 // ... defaultConfig {//. .. targetSdkVersion 21}}
Be sure to sync your project later.
eclipse < / H2>
v7-appcompat
in the eclipse you have to use when using it as a library project to copy it to your * code / code * folder Not enough. Please read step-by-step tutorials on developer.android.com so how can the project be imported properly.
As soon as the project is imported, you realize that some folders in the / res
folder are red-underlined due to errors like:
error: receive parent for item Time error: No resource found that the person's name matches 'Android: TextAppearance.Material'. Error: Error retrieving parent for item: No resource found that matches given 'android: widgets. material. * 'Error: Error: No resource found that matches the given name: attr' android: actionModeShareDrawable '
solution
You only do one thing The project.properties
file from android-support-V7-appcompat
and target = android-19
to target = android-21 < Change the target from / code> Just project a later - - & gt; Clean ...
so that changes are effective.
IntelliJ IDEA (Do not use Gradle)
Eclipse equally it only Android-support-v7-appcompat.jar
; You will need to import appacket
as a module, read more about it. ( Note: If you are only using .jar
you will get NoClassDefFoundErrors
at runtime )
When you are trying to create this project, you will say something like the following: res / values-v **
folders your message window: / P>
Error: Android-APT-compiler: [Optpipe] Resource found that matches the given name: attr 'android: colorPrimary' error: (75, -1) android-apt- Compiler: [appcompat] C: \ [your path] \ SDK \ x Error in retrieving parent for item: No resource found, given name 'Android: Widget' Matches material. Right-click on the action button '// and so on
solution
appampate
module -> Open module setting (F4) -> Select the Android API 21 platform from the [Dependance tab] dropdown -> Apply
Then rebuild the project (build -> rebuilding project) and you are good to go.
Comments
Post a Comment