How to fix linking error on Android project - android

My compiler just showed this error. I have no idea what happened.
I'm testing a project which runs with firebase. On its request, I just went to project structure to change my minsdk to 26, but after I changed it, it provides these errors.
Since this is my first Android project, I have no idea what has happened.
Can somebody give me a hand and help me get through it?
Android resource linking failed
C:\Users\user\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
C:\Users\user\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
C:\Users\user\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1894: error: resource drawable/edit_text_background_dark_round (aka com.example.myapplication:drawable/edit_text_background_dark_round) not found.
C:\Users\user\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1897: error: resource drawable/ic_down_arrow (aka com.example.myapplication:drawable/ic_down_arrow) not found.
C:\Users\user\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v21\values-v21.xml:282: error: resource drawable/edit_text_background_dark_round (aka com.example.myapplication:drawable/edit_text_background_dark_round) not found.
C:\Users\user\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v21\values-v21.xml:285: error: resource drawable/ic_down_arrow (aka com.example.myapplication:drawable/ic_down_arrow) not found.
C:\Users\user\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2786: error: resource android:attr/fontVariationSettings not found.
C:\Users\user\AndroidStudioProjects\MyApplication\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2787: error: resource android:attr/ttcIndex not found.
error: failed linking references.

check XML files cause "android:attr/dialogCornerRadius not found"
means that 'dialogCornerRadius' is not defined , you can replace it
with value like "2dp" or initialise it in ' dimens.xml' check this
link to create 'dimen' file
How to use dimens.xml in Android?

Related

Android Resource linking failed in AndroidManifest.xml file

ERROR:C:\Users\Apochi\IgClone\app\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:11: AAPT: error: resource style/Theme.InstagramCloneApp (aka com.example.instagramcloneapp:style/Theme.InstagramCloneApp) not found.
As error suggest your app theme does not exist, style/Theme.InstagramCloneApp (aka com.example.instagramcloneapp:style/Theme.InstagramCloneApp) not found.

AAPT: Error: Resource attr/(various) not found

Having all kinds of problems tonight. Downloaded updated Android Studio and Gradle and coded a little and then started getting these errors. Have tried uninstalling android studio, changing the version of Gradle in my build file to an earlier version, using an older version of android studio, deleting the Gradle cache, and maybe one or three other things. Older versions of Android Studio now say my project must be used with Android 3.6.
These things the build output is complaining about all seem to exist in the file it's talking about at the exact line. Tried commenting them out... that didn't work either.
Little out of my league here. Any of you gray hairs see something I'm missing?
Any help much appreciated.
===========================================================================
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:268:5-4347:
AAPT: error: resource attr/flow_horizontalSeparator (aka
com.myproject.myproject:attr/flow_horizontalSeparator) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:268:5-4347:
AAPT: error: resource attr/flow_verticalSeparator (aka
com.myproject.myproject:attr/flow_verticalSeparator) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:269:5-3548:
AAPT: error: resource attr/flow_horizontalSeparator (aka
com.myproject.myproject:attr/flow_horizontalSeparator) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:269:5-3548:
AAPT: error: resource attr/flow_verticalSeparator (aka
com.myproject.myproject:attr/flow_verticalSeparator) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:271:5-4382:
AAPT: error: resource attr/flow_horizontalSeparator (aka
com.myproject.myproject:attr/flow_horizontalSeparator) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:271:5-4382:
AAPT: error: resource attr/flow_verticalSeparator (aka
com.myproject.myproject:attr/flow_verticalSeparator) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:271:5-4382:
AAPT: error: resource attr/motionProgress (aka
com.myproject.myproject:attr/motionProgress) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:274:5-588:
AAPT: error: resource attr/motionProgress (aka
com.myproject.myproject:attr/motionProgress) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:275:5-652:
AAPT: error: resource attr/motionProgress (aka
com.myproject.myproject:attr/motionProgress) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:284:5-653:
AAPT: error: resource attr/motionProgress (aka
com.myproject.myproject:attr/motionProgress) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:284:5-653:
AAPT: error: resource attr/waveDecay (aka
com.myproject.myproject:attr/waveDecay) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:288:5-232:
AAPT: error: resource attr/motionPathRotate (aka
com.myproject.myproject:attr/motionPathRotate) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:290:5-295:36:
AAPT: error: resource attr/motionProgress (aka
com.myproject.myproject:attr/motionProgress) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:318:5-232:
AAPT: error: resource attr/motionProgress (aka
com.myproject.myproject:attr/motionProgress) not found.
C:\Users\me\.gradle\caches\transforms-2\files-2.1\d083c96bf16f0afa497f0903aac86f7e\constraintlayout-2.0.0-beta2\res\values\values.xml:322:5-335:98:
AAPT: error: reso
Update:
Added implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4' to my app's build.gradle file and it worked.
Pretty simple question but going to leave this up there. Might save someone a few hours of ignorance.
My case was really different. I had set android:text=" ??? " in my layout file, when I changed it to android:text=" ? " it worked. I have no idea why this works, maybe it helps someone. It took me hours to find the issue.

Removing resource com.myapp.application:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value

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>

Android Motionlayout: Android resource linking failed

I keep getting build errors after a refactor to motionlayout 2.0.0-beta1 (I know it's not the newest version - beta2 produces same errors).
Here's the stacktrace:
AAPT: /Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6514: error: resource attr/flow_horizontalSeparator (aka com.example:attr/flow_horizontalSeparator) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6514: error: resource attr/flow_verticalSeparator (aka com.example:attr/flow_verticalSeparator) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6515: error: resource attr/flow_horizontalSeparator (aka com.example:attr/flow_horizontalSeparator) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6515: error: resource attr/flow_verticalSeparator (aka com.example:attr/flow_verticalSeparator) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6517: error: resource attr/flow_horizontalSeparator (aka com.example:attr/flow_horizontalSeparator) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6517: error: resource attr/flow_verticalSeparator (aka com.example:attr/flow_verticalSeparator) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6517: error: resource attr/motionProgress (aka com.example:attr/motionProgress) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6860: error: resource attr/motionProgress (aka com.example:attr/motionProgress) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6861: error: resource attr/motionProgress (aka com.example:attr/motionProgress) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6876: error: resource attr/motionProgress (aka com.example:attr/motionProgress) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6877: error: resource attr/motionProgress (aka com.example:attr/motionProgress) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:6877: error: resource attr/waveDecay (aka com.example:attr/waveDecay) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:7288: error: resource attr/motionPathRotate (aka com.example:attr/motionPathRotate) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:7290: error: resource attr/motionProgress (aka com.example:attr/motionProgress) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:7549: error: resource attr/motionProgress (aka com.example:attr/motionProgress) not found.
/Users/TBS/StudioProjects/ExampleApp/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:8270: error: resource attr/duration (aka com.example:attr/duration) not found.
error: failed linking references.
There's no indication as to what file produces the error and to my knowledge I don't use any of these attributes anywhere in my project.
This problem is related to Android Studio 3.6 and ConstraintLayout versions earlier than 2.0.0-beta3 - I've reported the issue here. This is fixed in ConstraintLayout 2.0.0-beta3.
Android Studio 3.5 doesn't produce this error.
To make it work in AS 3.6 beta, upgrade to ConstraintLayout 2.0.0-beta3 or later.
If even upgrading ConstraintLayout doesn't help, try to add format attribute to your attr declaration in your attrs.xml file.
<resources>
<attr name="yourAttrName" format="string" />
</resources>
Choose proper format for your attribute.
upgrading to constraintlayout:2.0.0-beta4, worked for me ,
or later version. This happens after you upgrade android studio to 3.6
I upgraded gradle version to com.android.tools.build:gradle:3.6.0 then faced this issues, just downgrade gradle version to com.android.tools.build:gradle:3.5.3 and problem resolved
You would have to do two things:
Update your android studio.
add Latest dependency implementation
'androidx.constraintlayout:constraintlayout:2.0.0-rc1'

Android-studio emulator build failed/Android resource linking failed

I'm new to programming.
I'm just trying to create android emulator but I had this error
Android resource linking failed
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:616: error: resource anim/abc_popup_enter (aka com.example.mydashboardsapp_django:anim/abc_popup_enter) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:617: error: resource anim/abc_popup_exit (aka com.example.mydashboardsapp_django:anim/abc_popup_exit) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:620: error: resource anim/abc_grow_fade_in_from_bottom (aka com.example.mydashboardsapp_django:anim/abc_grow_fade_in_from_bottom) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:621: error: resource anim/abc_shrink_fade_out_from_bottom (aka com.example.mydashboardsapp_django:anim/abc_shrink_fade_out_from_bottom) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:624: error: resource anim/abc_tooltip_enter (aka com.example.mydashboardsapp_django:anim/abc_tooltip_enter) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:625: error: resource anim/abc_tooltip_exit (aka com.example.mydashboardsapp_django:anim/abc_tooltip_exit) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:788: error: resource color/abc_btn_colored_borderless_text_material (aka com.example.mydashboardsapp_django:color/abc_btn_colored_borderless_text_material) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:791: error: resource color/abc_btn_colored_text_material (aka com.example.mydashboardsapp_django:color/abc_btn_colored_text_material) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:845: error: resource drawable/abc_list_selector_holo_dark (aka com.example.mydashboardsapp_django:drawable/abc_list_selector_holo_dark) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:897: error: resource drawable/abc_list_selector_holo_dark (aka com.example.mydashboardsapp_django:drawable/abc_list_selector_holo_dark) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:929: error: resource color/abc_background_cache_hint_selector_material_dark (aka com.example.mydashboardsapp_django:color/abc_background_cache_hint_selector_material_dark) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:932: error: resource color/abc_primary_text_material_dark (aka com.example.mydashboardsapp_django:color/abc_primary_text_material_dark) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:933: error: resource color/abc_primary_text_material_light (aka com.example.mydashboardsapp_django:color/abc_primary_text_material_light) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:934: error: resource color/abc_primary_text_disable_only_material_dark (aka com.example.mydashboardsapp_django:color/abc_primary_text_disable_only_material_dark) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:935: error: resource color/abc_secondary_text_material_dark (aka com.example.mydashboardsapp_django:color/abc_secondary_text_material_dark) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:936: error: resource color/abc_secondary_text_material_light (aka com.example.mydashboardsapp_django:color/abc_secondary_text_material_light) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:937: error: resource color/abc_secondary_text_material_dark (aka com.example.mydashboardsapp_django:color/abc_secondary_text_material_dark) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:938: error: resource color/abc_secondary_text_material_light (aka com.example.mydashboardsapp_django:color/abc_secondary_text_material_light) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:939: error: resource color/abc_hint_foreground_material_dark (aka com.example.mydashboardsapp_django:color/abc_hint_foreground_material_dark) not found.
C:\Users\username\AndroidStudioProjects\MyDashboardsAppDjango\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:940: error: resource color/abc_hint_foreground_material_light (aka com.example.mydashboardsapp_django:color/abc_hint_foreground_material_light) not found.
I had tried to reinstalling emulator and android-studio itself
look through the setup document; https://docs.expo.io/versions/latest/workflow/android-studio-emulator/
I read through some post on StackOverflow but, doesn't really relate to my problem.
I Believe that error was caused by missing installation
Help please, I'm really don't know what to do.
What # Intsab Haider means that open folder, there;
open C: folder
open Users folder
open username folder
open AndroidStudioProjects folder
open MyDashboardsAppDjango folder
open app folder
open build folder
and delete whatever things in folder build folder
then go to android-studio and click the run button (a green play arrow) or shift F10
and see if it runs

Categories

Resources