gradle build with AAR failed with No resource found error - android

I have two modules in the project.
app - that's my app module
app-base - that's android library module my app uses.
When I build with build tool 21 and gradle android plugin 1.1.1
with following dependency, it will fail.
compile 'com.company.android:app-base:1.0.0#aar'
I deployed app-base aar to company sonatype Nexus by following command.
gradle uploadArchives
The error messages follows:
:app:processCustomAppDebugResources
Position 34:21-35 : No resource found that matches the given name: attr 'actionBarStyle'.
Position 34:21-35 : No resource found that matches the given name: attr 'actionBarStyle'.
Position 37:29-51 : No resource found that matches the given name: attr 'windowActionBarOverlay'.
Position 29:21-36 : No resource found that matches the given name: attr 'windowActionBar'.
Position 1 : Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
Position 1 : Error retrieving parent for item: No resource found that matches the given name '#style/Widget.AppCompat.ActionBar.Solid'.
Position 19:21-44 : No resource found that matches the given name: attr 'actionBarItemBackground'.
Position 7:21-31 : No resource found that matches the given name: attr 'background'.
Position 17:21-45 : No resource found that matches the given name: attr 'selectableItemBackground'.
Position 14:32-46 : No resource found that matches the given name: attr 'titleTextStyle'.
Position 7:21-31 : No resource found that matches the given name: attr 'background'.
Position 1 : Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
Position 1 : Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
:app:processCustomAppDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processCustomAppDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/service/android/default/sdk/build-tools/21.0.0/aapt'' finished with non-zero exit value 1
To build successfully this, I only need to remove #aar on same dependency.
compile 'com.company.android:app-base:1.0.0'
Could someone explain why this happens? What is difference using AAR dependency or not using it?

Those parameters are from Android Support Library. Have you already included the Android Support Library in your dependency list?
compile 'com.android.support:appcompat-v7:21.0.3'

Related

processDebugResources: Android build error

When I am going to build my application with ionic build android, facing following problems.
:processDebugResources
/home/rakesh/myproject/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3:
AAPT: Error retrieving parent for item: No resource found that matches
the given name
'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
/home/rakesh/myproject/platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4:
AAPT: Error retrieving parent for item: No resource found that matches
the given name
'android:TextAppearance.Material.Widget.Button.Colored'.
check your compilesdkversion be equal or greater than 24

Android appcompat-v7 themes_base.xml No resource found error

I have been trying to import appcompat-v7 into my app and have had no luck at all. I need this library in order to follow the steps listed here How do I use DrawerLayout to display over the ActionBar/Toolbar and under the status bar?. I have followed the steps documented https://developer.android.com/tools/support-library/setup.html, and when I add the library to my project, I'm getting a list of errors:
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:136: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:140: error: Error: No resource found that matches the given name: attr 'android:colorButtonNormal'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:138: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:139: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:137: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:134: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:135: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:144: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:148: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
I have the build target to API 21 for android-support-v7-appcompat. When I clean that project, I don't receive any errors. When I add appcompat-v7 as a library to my project, that is where the errors start appearing.
I have checked my SDK manager and everything is up to date. Can anyone help steer me in the right direction where I can resolve this issue?

Buck and Android Material theme

I am setting up Buck to speed up the build of an Android app. The app uses the Material Theme through the appcompat-v7:21.0.+ library but Buck cannot find the required resources. Any hints?
Here is the error output:
$ buck build //app/src/main:main
Using buckd.
[-] PROCESSING BUCK FILES...FINISHED 0.4s
[+] BUILDING...2.0s (3/6 JOBS)
|=> IDLE
|=> IDLE
|=> IDLE
|=> //app/src/main:main#aapt_package... 1.5s (running aapt_package[1.5s])
Log:
No Android platform target specified. Using default: Google Inc.:Google APIs:21
app/src/main/res/values/styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
app/src/main/res/values/styles.xml:14: error: Error: No resource found that matches the given name: attr 'actionBarSize'.
app/src/main/res/values-v21/styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
app/src/main/res/values/styles.xml:23: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
app/src/main/res/values/styles.xml:33: error: Error: No resource found that matches the given name: attr 'actionBarSize'.
app/src/main/res/values/styles.xml:29: error: Error: No resource found that matches the given name: attr 'colorPrimary'.
app/src/main/res/values/styles.xml:38: error: Error: No resource found that matches the given name: attr 'editTextColor'.
app/src/main/res/values-v21/styles.xml:14: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
app/src/main/res/values-v21/styles.xml:32: error: Error: No resource found that matches the given name: attr 'colorPrimary'.
BUILD FAILED: //app/src/main:main#aapt_package failed with exit code 1:
aapt_package
Download appcompat-aar file and use as dependency in your anroid_resource rule
https://github.com/facebookarchive/AntennaPod/blob/buck/BUCK#L133
https://github.com/facebookarchive/AntennaPod/blob/buck/BUCK#L64

android appcompat v7 support library issues [duplicate]

I'm using Android Studio and when I add compile "com.android.support:appcompat-v7:21.0.0"
to my Gradle file, I'm getting a ton of errors:
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'.
All of these seem to be showing up in:
\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
and
\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v21\values.xml
AppCompat v21 builds themes that require the new APIs provided in API 21 (Android 5.0). To compile your application with AppCompat, you must also compile against API 21. The recommended setup for compiling/building with API 21 is a compileSdkVersion of 21 and a buildToolsVersion of 21.0.1 (which is the highest at this time - you always want to use the latest build tools).
Make sure the value for target (which tells the target android version) in project.properties file of both your project folder and appcompat_v7 folder is same (preferably the latest).
: inside 'your_project'/project.properties
target=android-21
android.library.reference.1=../appcompat_v7
and
: inside appcompat_v7/project.properties
target=android-21
android.library=true
and after this don't forget to clean your project .
Changing compile 'com.android.support:appcompat-v7:21.0.0' into compile 'com.android.support:appcompat-v7:20.0.0' in gradle.build works for me.
If you are using android studio goto
File --> Project Structure
In the Properties tab change Compile Sdk Version to AP1 21 and Build Tools Version to highest available version.
And then Refresh Gradle
changing the complie SDk version to API level 21 fixed it for me. then i ran into others issues of deploying the app to my device. i changed the minimun API level to target to what i want and that fixed it.
incase someone is experiencing this again.
Just select target api level to 21 for compiling, click Apply -> click OK, clean and build project and run it.
my solucion is compile with other version
build.gradle (app)
compileSdkVersion 21
Good Luck
Change your compile sdk to 23.This fixed it for me.
I vote whoever can solve like me.
I had this same problem as u , I spent many hours to get correct .
Please test .
Upgrade entire SDK , the update 21.0.2 build also has updates from Google Services play .
Upgrade everything.
In your workspace delete folders ( android -support- v7 - AppCompat ) and ( google -play - services_lib )
Re-import these projects into the IDE and select to copy them to your workspace again.
The project ( google -play - services_lib ) to perform the action of Refresh and Build
**** ***** Problem
The project ( android -support- v7 - AppCompat ) mark the 5.0 API then Refresh and Build .
In his project , in properties , android , import libraries ( android -support- v7 - AppCompat ) and ( google -play - services_lib ) then Refresh and Build .
If you don't want to use API 21 you can use the older version of appcompact library, use older app compact library without updating it.
you can achieve this by simply following steps:
1) Extract the downloaded version of complete sdk and eclipse bundle.
2) Simply import appCompact library from sdk\extras\android\support\v7\appcompact
now you are done.
I have updated the build.gradle(Module: app):
Old Code:
compile 'com.android.support:appcompat-v7:23.0.1'
New Code:
compile 'com.android.support:appcompat-v7:22.2.0'
Works for me in android studio.
Resource for android will be a option available when you go to your sdk manager and select Android 5.0. Download and install that. This will fix the problem of resource not found.
Hi there I was having the same error involving the appcompatv7 library and I did as #ianhanniballake suggested and check the build version of the library, by selecting it and giving a click with the secondary button of the mouse then:
Properties -> Android -> Android 5.0.1 api level 21
then clean all projects but I had no luck, so after loosing all my hopes I decided to upgrade from Eclipse Kepler to Eclipse Luna.
While I was waiting for the download to complete. I decided to try another thing, so I went and delete from eclipse the appcompatv7 library and checked the
Delete project contents on disk.
Opened the Android SDK to check if there were any updates, then I removed all library references from my project by selecting my project and under
Project -> Properties -> Android -> Library section
removed all libraries including the one that started all this problem
Google_Play_Services_Lib
then restarted Eclipse and copied from the Android SDK.The folder appcompat from:
android-sdk-linux/extras/android/support/v7
To my eclpse workspace, then imported it agan in to Eclipse from Import exsting project in workspace then choose the propper build tool version
Android 5.0.1 api 21
and added all my reference libraries, cleaned all projects and done everything was working again.
I choose for all my reference libraries the same build tool.
Hope this helps!!!!
By the way I tried to give a vote but I haven't had enough rep to do it.
Check adding google play services here as i was facing the same problem and removed everything then followed the steps and got everything working.
I ran into the same issue and had the right API level values in my build.gradle compileSdkVersion 21, targetSdkVersion 21 and a buildToolsVersion of 21.0.1
However, I was including this as a module in my project so I had to make sure the other module gradle settings matched API 21. After that it all worked for me.
I changed
compile 'com.android.support:appcompat-v7:19.1.+'
into
compile 'com.android.support:appcompat-v7:22.1.+'
in build.gradle and after sync I didn't get any errors
In my case with Eclipse IDE, I had the same problem and the solution was:
1- Install the latest available API (SDK Platform & Google APIs)
2- Create the project with the following settings:
Compile With: use the latest API version available at the time
the other values can receive values according at your requirements (look at the meaning of each one in previous comments)
For me works this:
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'
}
I modified:
compileSdkVersion 21
buildToolsVersion '23.0'
appcompat-v7:22.2.0'
I was facing this problem when I imported google-services.json file to implement Analytics. I already had global_tracker.xml file in the xml folder. During build, while merging contents from google-services.json file, the error was started occurring. For time being, the error is resolved after removing the goolgle-services.json file. And using the older Analytics solution.
Check the last XML or Json file that you edited/imported and maybe you will file error there. That's what helped in my case.
THIS HELPED ME
Update the Android SDK to latest version
Update app/build.gradle with latest components:
compileSdkVersion 25
buildToolsVersion "25.0.2"
minSdkVersion 17
targetSdkVersion 25
Hope this solves your problem
This works very well for me. Go to the android-support-v7-appcompat project and open the file "project.properties" and insert this lines if missing:
target=android-25
compile=android-21
I was facing the same issue for one of my phonegap project. To resolve this I have followed , following step
1) Right click on Project name (In my Case android) , select "Open Module Settings"
2) Select modules (android and CordovaLib)
3) Click properties on top
4) Chose Compile SDK version (I have chosen API 26: Android 8.0 )
5) Choose Build Tools Version (I have chosen 26.0.2)
6) Source Compatibility ( 1.6)
7) Target Compatibility ( 1.6)
Click Ok and rebuild project.
Also one more additional step
Add
compile 'com.android.support:appcompat-v7:27.0.2'
build.gradle (Module:android)
Following link shows my setting for step I have followed
https://app.box.com/s/itkkjz09wgy36jwowhvzcyx6fp7o2gkh

AppCompat v7 r21 returning error in values.xml?

I'm using Android Studio and when I add compile "com.android.support:appcompat-v7:21.0.0"
to my Gradle file, I'm getting a ton of errors:
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'.
All of these seem to be showing up in:
\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
and
\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v21\values.xml
AppCompat v21 builds themes that require the new APIs provided in API 21 (Android 5.0). To compile your application with AppCompat, you must also compile against API 21. The recommended setup for compiling/building with API 21 is a compileSdkVersion of 21 and a buildToolsVersion of 21.0.1 (which is the highest at this time - you always want to use the latest build tools).
Make sure the value for target (which tells the target android version) in project.properties file of both your project folder and appcompat_v7 folder is same (preferably the latest).
: inside 'your_project'/project.properties
target=android-21
android.library.reference.1=../appcompat_v7
and
: inside appcompat_v7/project.properties
target=android-21
android.library=true
and after this don't forget to clean your project .
Changing compile 'com.android.support:appcompat-v7:21.0.0' into compile 'com.android.support:appcompat-v7:20.0.0' in gradle.build works for me.
If you are using android studio goto
File --> Project Structure
In the Properties tab change Compile Sdk Version to AP1 21 and Build Tools Version to highest available version.
And then Refresh Gradle
changing the complie SDk version to API level 21 fixed it for me. then i ran into others issues of deploying the app to my device. i changed the minimun API level to target to what i want and that fixed it.
incase someone is experiencing this again.
Just select target api level to 21 for compiling, click Apply -> click OK, clean and build project and run it.
my solucion is compile with other version
build.gradle (app)
compileSdkVersion 21
Good Luck
Change your compile sdk to 23.This fixed it for me.
I vote whoever can solve like me.
I had this same problem as u , I spent many hours to get correct .
Please test .
Upgrade entire SDK , the update 21.0.2 build also has updates from Google Services play .
Upgrade everything.
In your workspace delete folders ( android -support- v7 - AppCompat ) and ( google -play - services_lib )
Re-import these projects into the IDE and select to copy them to your workspace again.
The project ( google -play - services_lib ) to perform the action of Refresh and Build
**** ***** Problem
The project ( android -support- v7 - AppCompat ) mark the 5.0 API then Refresh and Build .
In his project , in properties , android , import libraries ( android -support- v7 - AppCompat ) and ( google -play - services_lib ) then Refresh and Build .
If you don't want to use API 21 you can use the older version of appcompact library, use older app compact library without updating it.
you can achieve this by simply following steps:
1) Extract the downloaded version of complete sdk and eclipse bundle.
2) Simply import appCompact library from sdk\extras\android\support\v7\appcompact
now you are done.
I have updated the build.gradle(Module: app):
Old Code:
compile 'com.android.support:appcompat-v7:23.0.1'
New Code:
compile 'com.android.support:appcompat-v7:22.2.0'
Works for me in android studio.
Resource for android will be a option available when you go to your sdk manager and select Android 5.0. Download and install that. This will fix the problem of resource not found.
Hi there I was having the same error involving the appcompatv7 library and I did as #ianhanniballake suggested and check the build version of the library, by selecting it and giving a click with the secondary button of the mouse then:
Properties -> Android -> Android 5.0.1 api level 21
then clean all projects but I had no luck, so after loosing all my hopes I decided to upgrade from Eclipse Kepler to Eclipse Luna.
While I was waiting for the download to complete. I decided to try another thing, so I went and delete from eclipse the appcompatv7 library and checked the
Delete project contents on disk.
Opened the Android SDK to check if there were any updates, then I removed all library references from my project by selecting my project and under
Project -> Properties -> Android -> Library section
removed all libraries including the one that started all this problem
Google_Play_Services_Lib
then restarted Eclipse and copied from the Android SDK.The folder appcompat from:
android-sdk-linux/extras/android/support/v7
To my eclpse workspace, then imported it agan in to Eclipse from Import exsting project in workspace then choose the propper build tool version
Android 5.0.1 api 21
and added all my reference libraries, cleaned all projects and done everything was working again.
I choose for all my reference libraries the same build tool.
Hope this helps!!!!
By the way I tried to give a vote but I haven't had enough rep to do it.
Check adding google play services here as i was facing the same problem and removed everything then followed the steps and got everything working.
I ran into the same issue and had the right API level values in my build.gradle compileSdkVersion 21, targetSdkVersion 21 and a buildToolsVersion of 21.0.1
However, I was including this as a module in my project so I had to make sure the other module gradle settings matched API 21. After that it all worked for me.
I changed
compile 'com.android.support:appcompat-v7:19.1.+'
into
compile 'com.android.support:appcompat-v7:22.1.+'
in build.gradle and after sync I didn't get any errors
In my case with Eclipse IDE, I had the same problem and the solution was:
1- Install the latest available API (SDK Platform & Google APIs)
2- Create the project with the following settings:
Compile With: use the latest API version available at the time
the other values can receive values according at your requirements (look at the meaning of each one in previous comments)
For me works this:
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'
}
I modified:
compileSdkVersion 21
buildToolsVersion '23.0'
appcompat-v7:22.2.0'
I was facing this problem when I imported google-services.json file to implement Analytics. I already had global_tracker.xml file in the xml folder. During build, while merging contents from google-services.json file, the error was started occurring. For time being, the error is resolved after removing the goolgle-services.json file. And using the older Analytics solution.
Check the last XML or Json file that you edited/imported and maybe you will file error there. That's what helped in my case.
THIS HELPED ME
Update the Android SDK to latest version
Update app/build.gradle with latest components:
compileSdkVersion 25
buildToolsVersion "25.0.2"
minSdkVersion 17
targetSdkVersion 25
Hope this solves your problem
This works very well for me. Go to the android-support-v7-appcompat project and open the file "project.properties" and insert this lines if missing:
target=android-25
compile=android-21
I was facing the same issue for one of my phonegap project. To resolve this I have followed , following step
1) Right click on Project name (In my Case android) , select "Open Module Settings"
2) Select modules (android and CordovaLib)
3) Click properties on top
4) Chose Compile SDK version (I have chosen API 26: Android 8.0 )
5) Choose Build Tools Version (I have chosen 26.0.2)
6) Source Compatibility ( 1.6)
7) Target Compatibility ( 1.6)
Click Ok and rebuild project.
Also one more additional step
Add
compile 'com.android.support:appcompat-v7:27.0.2'
build.gradle (Module:android)
Following link shows my setting for step I have followed
https://app.box.com/s/itkkjz09wgy36jwowhvzcyx6fp7o2gkh

Categories

Resources