Gradle build fail -> Android resource linking failed
Hello, i'm facing this problem:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-background-job:processDebugAndroidTestResources'.
> Android resource linking failed
Output: <ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:226: error: resource android:attr/fontStyle not found.
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:226: error: resource android:attr/font not found.
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:226: error: resource android:attr/fontWeight not found.
error: failed linking references.
Command: <HomePath>/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/d6c192473309c0ac246338a3906cd746/aapt2-3.2.1-4818971-linux/aapt2 link -I\
/usr/lib/android-sdk/platforms/android-25/android.jar\
--manifest\
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/merged_manifests/debugAndroidTest/processDebugAndroidTestManifest/merged/AndroidManifest.xml\
-o\
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/processed_res/debugAndroidTest/processDebugAndroidTestResources/out/resources-debugAndroidTest.ap_\
-R\
@<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/incremental/processDebugAndroidTestResources/resources-list-for-resources-debugAndroidTest.ap_.txt\
--auto-add-overlay\
--java\
<ProjectPath>/node_modules/react-native-background-job/android/build/generated/not_namespaced_r_class_sources/debugAndroidTest/processDebugAndroidTestResources/r\
-0\
apk\
--output-text-symbols\
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/symbols/androidTest/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #0
Output: <HomePath>/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/05d723b06b37106ed5943631d4b04e9a/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/05d723b06b37106ed5943631d4b04e9a/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/05d723b06b37106ed5943631d4b04e9a/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/64c50eb6de2ba31b77c6346dca2aa7bb/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/fontStyle not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/64c50eb6de2ba31b77c6346dca2aa7bb/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/font not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/64c50eb6de2ba31b77c6346dca2aa7bb/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/fontWeight not found.
error: failed linking references.
Command: <HomePath>/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/d6c192473309c0ac246338a3906cd746/aapt2-3.2.1-4818971-linux/aapt2 link -I\
/usr/lib/android-sdk/platforms/android-25/android.jar\
--manifest\
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/merged_manifests/debugAndroidTest/processDebugAndroidTestManifest/merged/AndroidManifest.xml\
-o\
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/processed_res/debugAndroidTest/processDebugAndroidTestResources/out/resources-debugAndroidTest.ap_\
-R\
@<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/incremental/processDebugAndroidTestResources/resources-list-for-resources-debugAndroidTest.ap_.txt\
--auto-add-overlay\
--java\
<ProjectPath>/node_modules/react-native-background-job/android/build/generated/not_namespaced_r_class_sources/debugAndroidTest/processDebugAndroidTestResources/r\
-0\
apk\
--output-text-symbols\
<ProjectPath>/node_modules/react-native-background-job/android/build/intermediates/symbols/androidTest/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-notifications:processDebugAndroidTestResources'.
> Android resource linking failed
Output: error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found.
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found.
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:234: error: resource android:attr/fontStyle not found.
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:234: error: resource android:attr/font not found.
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/incremental/mergeDebugAndroidTestResources/merged.dir/values/values.xml:234: error: resource android:attr/fontWeight not found.
error: failed linking references.
Command: <HomePath>/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/d6c192473309c0ac246338a3906cd746/aapt2-3.2.1-4818971-linux/aapt2 link -I\
/usr/lib/android-sdk/platforms/android-23/android.jar\
--manifest\
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/merged_manifests/debugAndroidTest/processDebugAndroidTestManifest/merged/AndroidManifest.xml\
-o\
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/processed_res/debugAndroidTest/processDebugAndroidTestResources/out/resources-debugAndroidTest.ap_\
-R\
@<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/incremental/processDebugAndroidTestResources/resources-list-for-resources-debugAndroidTest.ap_.txt\
--auto-add-overlay\
--java\
<ProjectPath>/node_modules/react-native-notifications/android/build/generated/not_namespaced_r_class_sources/debugAndroidTest/processDebugAndroidTestResources/r\
-0\
apk\
--output-text-symbols\
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/symbols/androidTest/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #1
Output: error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/05d723b06b37106ed5943631d4b04e9a/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/05d723b06b37106ed5943631d4b04e9a/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/05d723b06b37106ed5943631d4b04e9a/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/64c50eb6de2ba31b77c6346dca2aa7bb/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/fontStyle not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/64c50eb6de2ba31b77c6346dca2aa7bb/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/font not found.
<HomePath>/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/64c50eb6de2ba31b77c6346dca2aa7bb/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/fontWeight not found.
error: failed linking references.
Command: <HomePath>/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-linux.jar/d6c192473309c0ac246338a3906cd746/aapt2-3.2.1-4818971-linux/aapt2 link -I\
/usr/lib/android-sdk/platforms/android-23/android.jar\
--manifest\
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/merged_manifests/debugAndroidTest/processDebugAndroidTestManifest/merged/AndroidManifest.xml\
-o\
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/processed_res/debugAndroidTest/processDebugAndroidTestResources/out/resources-debugAndroidTest.ap_\
-R\
@<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/incremental/processDebugAndroidTestResources/resources-list-for-resources-debugAndroidTest.ap_.txt\
--auto-add-overlay\
--java\
<ProjectPath>/node_modules/react-native-notifications/android/build/generated/not_namespaced_r_class_sources/debugAndroidTest/processDebugAndroidTestResources/r\
-0\
apk\
--output-text-symbols\
<ProjectPath>/node_modules/react-native-notifications/android/build/intermediates/symbols/androidTest/debug/R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-linux Daemon #1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
same issue here
facing same issue.
Android resource linking failed
Output: /Users/admin/projects/project-path/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:649: error: resource android:attr/fontVariationSettings not found.
/Users/admin/projects/project-path/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:649: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: /Users/admin/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/7a09f925dfdf36506c0b6b9101180755/aapt2-3.2.1-4818971-osx/aapt2 link -I
/Users/admin/Library/Android/sdk/platforms/android-26/android.jar
--manifest
/Users/admin/projects/project-path/android/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml
-o
/Users/admin/projects/project-path/android/app/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_
-R
@/Users/admin/projects/project-path/android/app/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
/Users/admin/projects/project-path/android/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r
--custom-package
com.project
-0
apk
--output-text-symbols
/Users/admin/projects/project-path/android/app/build/intermediates/symbols/debug/R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0