there is a ton of questions pertaining to this type of exception an i really dont get how it came about. I guess the exception is telling me that there are a bunch of date picker attributes that it expected to find in the styles file of my app that it could not find and I do not understand why as I swear exactly the same code was compiling flawlessly a few months back. What I dont inderstand is why its even looking for those in my project folder all those attrs are actually found and well defined on the values file where the exception stems from. all suggestions such as cleaning and rebuilding or upgrading to androidx have not worked. this is so vexing
AAPT: C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3535: error: style attribute 'attr/minDate (aka com.example.android.gymlogmulti.generic:attr/minDate)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3536: error: style attribute 'attr/maxDate (aka com.example.android.gymlogmulti.generic:attr/maxDate)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3544: error: style attribute 'attr/weekDayTextAppearance (aka com.example.android.gymlogmulti.generic:attr/weekDayTextAppearance)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3545: error: style attribute 'attr/dateTextAppearance (aka com.example.android.gymlogmulti.generic:attr/dateTextAppearance)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3551: error: style attribute 'attr/datePickerMode (aka com.example.android.gymlogmulti.generic:attr/datePickerMode)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3552: error: style attribute 'attr/dtp_legacyLayout (aka com.example.android.gymlogmulti.generic:attr/dtp_legacyLayout)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3553: error: style attribute 'attr/calendarViewShown (aka com.example.android.gymlogmulti.generic:attr/calendarViewShown)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3638: error: style attribute 'attr/weekDayTextAppearance (aka com.example.android.gymlogmulti.generic:attr/weekDayTextAppearance)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3639: error: style attribute 'attr/dateTextAppearance (aka com.example.android.gymlogmulti.generic:attr/dateTextAppearance)' not found.
C:\Users\theo\Desktop\GymLog_App\GymLogMulti\app\build\intermediates\incremental\mergeGenericVersionDebugResources\merged.dir\values\values.xml:3644: error: style attribute 'attr/datePickerMode (aka com.example.android.gymlogmulti.generic:attr/datePickerMode)' not found.
I just found the source of the issue by using CTRL+SHIFT+F and looking for the problematic attributes in the code (of the entire scope). Turns out the culprit was a third party dependency. Once i uninstalled it it was fixed. I guess the issue came from updating gradle and these outdated libraries somehow interfering with it.
I still dont understand the nature of the issue exactly but I hope this helps someone else dealing with the same issue. I just spent waaay to long looking at this.
Related
I face this problem:
AAPT: error: resource attr/title_text (aka com.example.DropdownTextView:attr/title_text) not found
I found this:
https://github.com/hakobast/DropdownTextView/issues/14
Unfortunately version 0.1.1 do not contain all functions.
If someone know the work-around please share.
I fixed the issue in 0.3.3 and now AAPT: error: resource attr/title_text (aka com.example.DropdownTextView:attr/title_text) not found is not coming.
Please find the detail for integrating the library at
https://stackoverflow.com/a/67520594/4828650
From one day to another I'm getting this error in my project:
Android resource linking failed
warn: removing resource com.myapp.application:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value.
C:\Users\adamv\.gradle\caches\transforms-1\files-1.1\jetified-facebook-login-5.0.0.aar\93f0acb2a4de491348f33e5cac2f3dd4\res\drawable\com_facebook_button_login_background.xml:26: error: resource color/com_facebook_button_background_color_focused_disabled (aka com.myapp.application:color/com_facebook_button_background_color_focused_disabled) not found.
C:\Users\adamv\.gradle\caches\transforms-1\files-1.1\jetified-facebook-login-5.0.0.aar\93f0acb2a4de491348f33e5cac2f3dd4\res\drawable\com_facebook_button_login_background.xml:38: error: resource color/com_facebook_button_background_color_focused (aka com.myapp.application:color/com_facebook_button_background_color_focused) not found.
C:\Users\adamv\.gradle\caches\transforms-1\files-1.1\jetified-facebook-login-5.0.0.aar\93f0acb2a4de491348f33e5cac2f3dd4\res\drawable\com_facebook_button_login_background.xml:39: error: resource color/com_facebook_button_border_color_focused (aka com.myapp.application:color/com_facebook_button_border_color_focused) not found.
C:\a_projects\myapp-android\app\src\main\res\layout\activity_login.xml:75: error: resource drawable/com_facebook_button_icon_white (aka com.myapp.application:drawable/com_facebook_button_icon_white) not found.
C:\a_projects\myapp-android\app\src\main\res\layout\activity_register.xml:113: error: resource drawable/com_facebook_button_icon_white (aka com.myapp.application:drawable/com_facebook_button_icon_white) not found.
C:\a_projects\myapp-android\app\src\main\res\layout\activity_settings.xml:181: error: resource drawable/com_facebook_button_icon_white (aka com.myapp.application:drawable/com_facebook_button_icon_white) not found.
error: failed linking file resources.
I did nothing with the code. It is failing to build from one day to another.
In my gradle I use the following facebook libs:
implementation 'com.facebook.android:facebook-login:5.0.0'
implementation 'com.facebook.android:facebook-share:[5,6)'
These facebook libs were worked. I have another app where I use these, and that wan builds falwlessly.
Please, help if you can.
See Prince's answer here. If that does not work, you can manually set the colors.
<color name="com_facebook_button_background_color_focused_disabled">#3C5A99</color>
<color name="com_facebook_button_background_color_focused">#3C5A99</color>
<color name="com_facebook_button_border_color_focused">#3C5A99</color>
When I want to try the application on the emulator or extract the .apk
I face this error
Android resource linking failed
error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
error: failed linking references.
I think your are applying that style wrong.
Try to set the style of your view in your layout (.xml file) this way:
style="#style/TextAppearance.Material.Widget.Button.Borderless.Colored"
Let me know if that helped!
I imported an Android project into my eclipse workspace, but I get getting the following errors. I have googled for a resolution but have not found one. Please can anyone point me in the right direction? Thank you in advance!
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:5: error: Attribute "mapType" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:12: error: Attribute "cameraBearing" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:13: error: Attribute "cameraTargetLat" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:14: error: Attribute "cameraTargetLng" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:15: error: Attribute "cameraTilt" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:16: error: Attribute "cameraZoom" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:17: error: Attribute "uiCompass" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:18: error: Attribute "uiRotateGestures" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:19: error: Attribute "uiScrollGestures" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:20: error: Attribute "uiTiltGestures" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:21: error: Attribute "uiZoomControls" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:22: error: Attribute "uiZoomGestures" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:23: error: Attribute "useViewLifecycle" has already been defined
C:\Development\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values\maps_attrs.xml:24: error: Attribute "zOrderOnTop" has already been defined
EDIT
This is my Android project properties:
You are importing the google-playservices` library twice - and two different versions (one is labeled "froyo" on your screen shot).
Probably delete the old one and it will be fine. But the issue is that you cannot have resources defined twice and differently. Sometimes you can have the some one twice and defined the same and sometimes the build will not detect duplicates in Eclipse.
Get rid of one of the two editions of google-play-services that you have in your project libraries list.
Is there now a way to use the facebook plugin unity at the same time as other plugins (prime31 for example)?
I use multiple plugin other than facebook (push, in app purchase), and when I import the facebook plugin, it is impossible to compile because of resource sharing. I found a lot of topics on this issue, but I have not been able to solve my problem.
Here is an example of compile-time errors:
stderr[
res\values\attrs.xml:20: error: Attribute "show_pictures" has already been defined
res\values\attrs.xml:21: error: Attribute "extra_fields" has already been defined
res\values\attrs.xml:22: error: Attribute "show_title_bar" has already been defined
res\values\attrs.xml:23: error: Attribute "title_text" has already been defined
res\values\attrs.xml:24: error: Attribute "done_button_text" has already been defined
res\values\attrs.xml:25: error: Attribute "title_bar_background" has already been defined
res\values\attrs.xml:26: error: Attribute "done_button_background" has already been defined
res\values\attrs.xml:29: error: Attribute "multi_select" has already been defined
res\values\attrs.xml:32: error: Attribute "radius_in_meters" has already been defined
res\values\attrs.xml:33: error: Attribute "results_limit" has already been defined
res\values\attrs.xml:34: error: Attribute "search_text" has already been defined
res\values\attrs.xml:35: error: Attribute "show_search_box" has already been defined
res\values\attrs.xml:38: error: Attribute "confirm_logout" has already been defined
res\values\attrs.xml:39: error: Attribute "fetch_user_info" has already been defined
res\values\attrs.xml:40: error: Attribute "login_text" has already been defined
res\values\attrs.xml:41: error: Attribute "logout_text" has already been defined
res\values\attrs.xml:44: error: Attribute "preset_size" has already been defined
res\values\attrs.xml:50: error: Attribute "is_cropped" has already been defined
]
If anyone has a solution let me know!
thank you,
This happened to me when I had multiple attrs.xml files in my plugins folder, probably because of using the Facebook Unity plugin along with the Prime31 unity plugin. I deleted one of the attrs.xml files (which I found using the Unity search function) and then this error went away.
You can use multiple plugins from prime31 at the same time, just make sure that you have only one copy of P31RestKit.dll.