AAPT2 aapt2-3.2.1-4818971-windows Daemon - android

Android resource linking failed
Android resource linking failed
Output: C:\Users\ramin\Desktop\myapp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v26\values-v26.xml:7: error: resource android:attr/colorError not found.
C:\Users\ramin\Desktop\myapp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v26\values-v26.xml:11: error: resource android:attr/colorError not found.
C:\Users\ramin\Desktop\myapp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v26\values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
C:\Users\ramin\Desktop\myapp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:542: error: resource android:attr/fontStyle not found.
C:\Users\ramin\Desktop\myapp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:542: error: resource android:attr/font not found.
C:\Users\ramin\Desktop\myapp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:542: error: resource android:attr/fontWeight not found.
error: failed linking references.
Command: C:\Users\ramin\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\62269942571a2bd8ed5f0b2819ca9a1d\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\ramin\AppData\Local\Android\Sdk\platforms\android-25\android.jar\
--manifest\
C:\Users\ramin\Desktop\myapp\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Users\ramin\Desktop\myapp\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#C:\Users\ramin\Desktop\myapp\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\ramin\Desktop\myapp\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--proguard-main-dex\
C:\Users\ramin\Desktop\myapp\app\build\intermediates\legacy_multidex_aapt_derived_proguard_rules\debug\processDebugResources\manifest_keep.txt\
--custom-package\
com.sell.arkaysell\
-0\
apk\
--output-text-symbols\
C:\Users\ramin\Desktop\myapp\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Help me please, tried: Clean project Rebuild Project Invalid Caches / Restart Sync Project with Gradle Files

These resources were added in SDK version 28. You need to update your build.gradle file to use compileSdkVersion 28 (from the error I see you're using 25 instead).

Related

How to fix android resource linking failed error in Android

I trying to open an Android project in Android Studio but I am getting the following error
Android resource linking failed
Output: C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2331: error: resource anim/abc_popup_enter (aka com.example.kontrol.mydictation:anim/abc_popup_enter) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2332: error: resource anim/abc_popup_exit (aka com.example.kontrol.mydictation:anim/abc_popup_exit) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2335: error: resource anim/abc_grow_fade_in_from_bottom (aka com.example.kontrol.mydictation:anim/abc_grow_fade_in_from_bottom) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2336: error: resource anim/abc_shrink_fade_out_from_bottom (aka com.example.kontrol.mydictation:anim/abc_shrink_fade_out_from_bottom) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2339: error: resource anim/abc_tooltip_enter (aka com.example.kontrol.mydictation:anim/abc_tooltip_enter) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2340: error: resource anim/abc_tooltip_exit (aka com.example.kontrol.mydictation:anim/abc_tooltip_exit) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2503: error: resource color/abc_btn_colored_borderless_text_material (aka com.example.kontrol.mydictation:color/abc_btn_colored_borderless_text_material) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2506: error: resource color/abc_btn_colored_text_material (aka com.example.kontrol.mydictation:color/abc_btn_colored_text_material) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2560: error: resource drawable/abc_list_selector_holo_dark (aka com.example.kontrol.mydictation:drawable/abc_list_selector_holo_dark) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2612: error: resource drawable/abc_list_selector_holo_dark (aka com.example.kontrol.mydictation:drawable/abc_list_selector_holo_dark) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2644: error: resource color/abc_background_cache_hint_selector_material_dark (aka com.example.kontrol.mydictation:color/abc_background_cache_hint_selector_material_dark) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2647: error: resource color/abc_primary_text_material_dark (aka com.example.kontrol.mydictation:color/abc_primary_text_material_dark) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2648: error: resource color/abc_primary_text_material_light (aka com.example.kontrol.mydictation:color/abc_primary_text_material_light) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2649: error: resource color/abc_primary_text_disable_only_material_dark (aka com.example.kontrol.mydictation:color/abc_primary_text_disable_only_material_dark) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2650: error: resource color/abc_secondary_text_material_dark (aka com.example.kontrol.mydictation:color/abc_secondary_text_material_dark) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2651: error: resource color/abc_secondary_text_material_light (aka com.example.kontrol.mydictation:color/abc_secondary_text_material_light) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2652: error: resource color/abc_secondary_text_material_dark (aka com.example.kontrol.mydictation:color/abc_secondary_text_material_dark) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2653: error: resource color/abc_secondary_text_material_light (aka com.example.kontrol.mydictation:color/abc_secondary_text_material_light) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2654: error: resource color/abc_hint_foreground_material_dark (aka com.example.kontrol.mydictation:color/abc_hint_foreground_material_dark) not found.
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:2655: error: resource color/abc_hint_foreground_material_light (aka com.example.kontrol.mydictation:color/abc_hint_foreground_material_light) not found.
>Command: C:\Users\kontrol\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\f2b7042c25ae8ac78b6339cc492412a8\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\kontrol\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.example.kontrol.mydictation\
-0\
apk\
--output-text-symbols\
C:\Users\kontrol\AndroidStudioProjects\MyDictation\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
I am using Android Studio 3.4.1. I don't understand what is causing this problem?

com.android.builder.internal.aapt.v2.Aapt2Exception After updating android studio to 3.2

i have recently updated my android studio to version 3.2 since then i am receiving com.android.builder.internal.aapt.v2.Aapt2Exception exception
i looked into solutions on stackoverflow but couldn't find the right one.
the drawable files as the error says are missing are already present there and the project was running fine before i updated the android studio to latest version 3.2.1
Error:
Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
Output: warn: removing resource com.example.mohit.chatapp:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_chat_box.xml:25: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_chat_box.xml:49: error: resource drawable/message_back (aka com.example.mohit.chatapp:drawable/message_back) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_main.xml:54: error: resource drawable/fb (aka com.example.mohit.chatapp:drawable/fb) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_splash_screen.xml:10: error: resource drawable/ic_place_black_24dp (aka com.example.mohit.chatapp:drawable/ic_place_black_24dp) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:19: error: resource drawable/profilepicture (aka com.example.mohit.chatapp:drawable/profilepicture) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:58: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:152: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:169: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml:3: error: resource drawable/ic_launcher_background (aka com.example.mohit.chatapp:drawable/ic_launcher_background) not found.
E:\andriodProjects\ChatApp\app\src\main\res\mipmap-anydpi-v26\ic_launcher_round.xml:3: error: resource drawable/ic_launcher_background (aka com.example.mohit.chatapp:drawable/ic_launcher_background) not found.
error: failed linking file resources.
Command: C:\Users\Mohit\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\1558dd943061657e6b17ed05cad5fd2f\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Mohit\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
E:\andriodProjects\ChatApp\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
E:\andriodProjects\ChatApp\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#E:\andriodProjects\ChatApp\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
E:\andriodProjects\ChatApp\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--proguard-main-dex\
E:\andriodProjects\ChatApp\app\build\intermediates\legacy_multidex_aapt_derived_proguard_rules\debug\processDebugResources\manifest_keep.txt\
--custom-package\
com.example.mohit.chatapp\
-0\
apk\
--output-text-symbols\
E:\andriodProjects\ChatApp\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: warn: removing resource com.example.mohit.chatapp:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_chat_box.xml:25: AAPT: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_chat_box.xml:49: AAPT: error: resource drawable/message_back (aka com.example.mohit.chatapp:drawable/message_back) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_main.xml:54: AAPT: error: resource drawable/fb (aka com.example.mohit.chatapp:drawable/fb) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_splash_screen.xml:10: AAPT: error: resource drawable/ic_place_black_24dp (aka com.example.mohit.chatapp:drawable/ic_place_black_24dp) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:19: AAPT: error: resource drawable/profilepicture (aka com.example.mohit.chatapp:drawable/profilepicture) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:58: AAPT: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:152: AAPT: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:169: AAPT: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml:3: AAPT: error: resource drawable/ic_launcher_background (aka com.example.mohit.chatapp:drawable/ic_launcher_background) not found.
E:\andriodProjects\ChatApp\app\src\main\res\mipmap-anydpi-v26\ic_launcher_round.xml:3: AAPT: error: resource drawable/ic_launcher_background (aka com.example.mohit.chatapp:drawable/ic_launcher_background) not found.
error: failed linking file resources.
Command: C:\Users\Mohit\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\1558dd943061657e6b17ed05cad5fd2f\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Mohit\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
E:\andriodProjects\ChatApp\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
E:\andriodProjects\ChatApp\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#E:\andriodProjects\ChatApp\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
E:\andriodProjects\ChatApp\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--proguard-main-dex\
E:\andriodProjects\ChatApp\app\build\intermediates\legacy_multidex_aapt_derived_proguard_rules\debug\processDebugResources\manifest_keep.txt\
--custom-package\
com.example.mohit.chatapp\
-0\
apk\
--output-text-symbols\
E:\andriodProjects\ChatApp\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
at com.android.build.gradle.internal.res.Aapt2ErrorUtils.rewriteException(Aapt2ErrorUtils.kt:97)
at com.android.build.gradle.internal.res.Aapt2ErrorUtils.rewriteLinkException(Aapt2ErrorUtils.kt:73)
at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResourcesTask.java:527)
at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.doFullTaskAction(LinkApplicationAndroidResourcesTask.java:275)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106)
at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
... 33 more
Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
Output: warn: removing resource com.example.mohit.chatapp:string/com_facebook_loginview_logged_in_using_facebook_f1gender without required default value.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_chat_box.xml:25: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_chat_box.xml:49: error: resource drawable/message_back (aka com.example.mohit.chatapp:drawable/message_back) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_main.xml:54: error: resource drawable/fb (aka com.example.mohit.chatapp:drawable/fb) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\activity_splash_screen.xml:10: error: resource drawable/ic_place_black_24dp (aka com.example.mohit.chatapp:drawable/ic_place_black_24dp) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:19: error: resource drawable/profilepicture (aka com.example.mohit.chatapp:drawable/profilepicture) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:58: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:152: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\layout\fragment_profile.xml:169: error: resource drawable/white_view (aka com.example.mohit.chatapp:drawable/white_view) not found.
E:\andriodProjects\ChatApp\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml:3: error: resource drawable/ic_launcher_background (aka com.example.mohit.chatapp:drawable/ic_launcher_background) not found.
E:\andriodProjects\ChatApp\app\src\main\res\mipmap-anydpi-v26\ic_launcher_round.xml:3: error: resource drawable/ic_launcher_background (aka com.example.mohit.chatapp:drawable/ic_launcher_background) not found.
error: failed linking file resources.
Command: C:\Users\Mohit\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\1558dd943061657e6b17ed05cad5fd2f\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Mohit\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
E:\andriodProjects\ChatApp\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
E:\andriodProjects\ChatApp\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#E:\andriodProjects\ChatApp\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
E:\andriodProjects\ChatApp\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--proguard-main-dex\
E:\andriodProjects\ChatApp\app\build\intermediates\legacy_multidex_aapt_derived_proguard_rules\debug\processDebugResources\manifest_keep.txt\
--custom-package\
com.example.mohit.chatapp\
-0\
apk\
--output-text-symbols\
E:\andriodProjects\ChatApp\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
at com.android.builder.internal.aapt.v2.Aapt2DaemonImpl.doLink(Aapt2DaemonImpl.kt:177)
at com.android.builder.internal.aapt.v2.Aapt2Daemon.link(Aapt2Daemon.kt:103)
at com.android.builder.internal.aapt.v2.Aapt2DaemonManager$LeasedAaptDaemon.link(Aapt2DaemonManager.kt:176)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:823)
at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResourcesTask.java:525)
... 49 more

Android resource linking failed with API 27 and API 26 or we can say below API 28

If I am using 28 API then I am getting Error: Program type already present: androidx.versionedparcelable.CustomVersionedParcelable which force me to migrate to androidx. and migrating androidx which causing error in my all the support fragments
Android resource linking failed
Output: E:\community_app\application\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
E:\community_app\application\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
E:\community_app\application\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:656: error: resource android:attr/fontVariationSettings not found.
E:\community_app\application\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:656: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Kunjan\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\612f5de46ad621100ae4392104a3337f\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
E:\sdk\platforms\android-27\android.jar\
--manifest\
E:\community_app\application\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
E:\community_app\application\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#E:\community_app\application\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
E:\community_app\application\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.krs.vastipatrak\
-0\
apk\
--output-text-symbols\
E:\community_app\application\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
I resolved this issue by first Invalidate caches/Restart from Android studio->File->Invalidate caches/Restart->Invalidate and Restart and then going to the build/intermediates directory of the app and delete all the files and folders there and rebuild the project. In your case you can simply delete all the contents in this directory:
E:\community_app\application\app\build\intermediates
I hope this helps!

adSize not found, Android Studio not linking ad framework?

I'm following https://developers.google.com/admob/android/quick-start?hl=en-US#import_the_mobile_ads_sdk .
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="SMART_BANNER"
ads:adUnitId="ca-app-pub-8143809646615023/6347460003">
>
</com.google.android.gms.ads.AdView>
the error I get when building:
```
Android resource linking failed
Output: /Users/quantum/QuantumPilot/android/feature/src/main/res/layout/activity_main.xml:29: error: attribute adSize (aka quantumpilot.quantumproductions.com.quantumpilot.app:adSize) not found.
/Users/quantum/QuantumPilot/android/feature/src/main/res/layout/activity_main.xml:29: error: attribute adUnitId (aka quantumpilot.quantumproductions.com.quantumpilot.app:adUnitId) not found.
error: failed linking file resources.
Command: /Users/quantum/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/502ec8114256bc9343b789f7637adf71/aapt2-3.2.1-4818971-osx/aapt2 link -I\
/Users/quantum/Library/Android/sdk/platforms/android-27/android.jar\
--manifest\
/Users/quantum/QuantumPilot/android/feature/build/intermediates/merged_manifests/debugFeature/processDebugFeatureManifest/merged/AndroidManifest.xml\
-o\
/Users/quantum/QuantumPilot/android/feature/build/intermediates/processed_res/debugFeature/processDebugFeatureResources/out/resources-debugFeature.ap_\
-R\
#/Users/quantum/QuantumPilot/android/feature/build/intermediates/incremental/processDebugFeatureResources/resources-list-for-resources-debugFeature.ap_.txt\
--auto-add-overlay\
--java\
/Users/quantum/QuantumPilot/android/feature/build/generated/not_namespaced_r_class_sources/debugFeature/processDebugFeatureResources/r\
--proguard\
/Users/quantum/QuantumPilot/android/feature/build/intermediates/proguard-rules/feature/debug/aapt_rules.txt\
--custom-package\
quantumpilot.quantumproductions.com.quantumpilot.feature\
-0\
apk\
--allow-reserved-package-id\
--package-id\
0x7e\
-I\
/Users/quantum/QuantumPilot/android/base/build/intermediates/processed_res/debugFeature/processDebugFeatureResources/out/resources-debugFeature.ap_\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
```

error: failed linking file resources: Daemon: AAPT2 aapt2-3.2.0-alpha14-4748712-linux Daemon #0

I'm aware this question has been asked now and again but I don't understand any of the answers that have been provided, maybe it's because they are not so relevant to my error.
I getting the error below after building my Gradle in my Android Studio project:
Android resource linking failed
Output:
W/ResourceType( 2455): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1329)
W/ResourceType( 2455): For resource 0x0101053e, entry index(1342) is beyond type entryCount(1329)
W/ResourceType( 2455): For resource 0x0101053b, entry index(1339) is beyond type entryCount(1329)
W/ResourceType( 2455): For resource 0x0101053c, entry index(1340) is beyond type entryCount(1329)
/home/sakhile/Downloads/ud851-Exercises-student/Lesson03-Green-Recycler-View/Tasker/app/src/main/res/layout/service_list.xml:47: error: attribute android:textinearLayoutStyle not found.
error: failed linking file resources.
Command: /home/sakhile/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.0-alpha14-4748712-linux.jar/1d98a9485ac4d9eebc41ea1399977a49/aapt2-3.2.0-alpha14-4748712-linux/aapt2 link -I\
/home/sakhile/Downloads/Sdk/platforms/android-25/android.jar\
--manifest\
/home/sakhile/Downloads/ud851-Exercises-student/Lesson03-Green-Recycler-View/Tasker/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\
-o\
/home/sakhile/Downloads/ud851-Exercises-student/Lesson03-Green-Recycler-View/Tasker/app/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\
-R\
#/home/sakhile/Downloads/ud851-Exercises-student/Lesson03-Green-Recycler-View/Tasker/app/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
/home/sakhile/Downloads/ud851-Exercises-student/Lesson03-Green-Recycler-View/Tasker/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
--custom-package\
com.example.sakhile.tasker\
-0\
apk\
--output-text-symbols\
/home/sakhile/Downloads/ud851-Exercises-student/Lesson03-Green-Recycler-View/Tasker/app/build/intermediates/symbols/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-alpha14-4748712-linux Daemon #0
In your layout service_list.xml you're trying to use an android attribute android:textinearLayoutStyle. First of all it looks like you've done a typo, but secondly there's no similar android attribute that you could be refering to. Did you perhaps mean to use android:textStyle?

Categories

Resources