Reputation: 1726
The android version of my React native app now refuses to build. I have updated the compiledSKD version to 28 as suggested in this post.
This is the error I get when I attempt to build on a physical device:
What went wrong: Execution failed for task ':app:processDebugResources'.
Android resource linking failed Output: /Users/someguy/projects/third/someapp/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:422: error: resource android:attr/fontVariationSettings not found.
/Users/someguy/projects/third/someapp/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:422: error: resource android:attr/ttcIndex not found. error: failed linking references. Command: /Users/someguy/.gradle/caches/transforms-1/files-1.1/aapt2-3.5.0-alpha03-5252756-osx.jar/d3ea99fc2d1356bcc9bc022a544dfd8b/aapt2-3.5.0-alpha03-5252756-osx/aapt2 link -I\ /Users/someguy/Library/Android/sdk/platforms/android-26/android.jar\ --manifest\ /Users/someguy/projects/third/someapp/android/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\ -o\ /Users/someguy/projects/third/someapp/android/app/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\ -R\ @/Users/someguy/projects/third/someapp/android/app/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\ --auto-add-overlay\ --java\ /Users/someguy/projects/third/someapp/android/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\ --proguard-main-dex\ /Users/someguy/projects/third/someapp/android/app/build/intermediates/legacy_multidex_aapt_derived_proguard_rules/debug/processDebugResources/manifest_keep.txt\ --custom-package\ com.someapp\ -0\ apk\ --output-text-symbols\ /Users/someguy/projects/third/someapp/android/app/build/intermediates/symbols/debug/R.txt\ --no-version-vectors Daemon: AAPT2 aapt2-3.5.0-alpha03-5252756-osx Daemon #0 Output: /Users/someguy/.gradle/caches/transforms-1/files-1.1/drawee-1.3.0.aar/cdd2e6e5cf23d268c647bf7bca6ef749/res/values/values.xml:3:5-53:675: AAPT: error: resource android:attr/fontVariationSettings not found. /Users/someguy/.gradle/caches/transforms-1/files-1.1/drawee-1.3.0.aar/cdd2e6e5cf23d268c647bf7bca6ef749/res/values/values.xml:3:5-53:675: AAPT: error: resource android:attr/ttcIndex not found. error: failed linking references. Command: /Users/someguy/.gradle/caches/transforms-1/files-1.1/aapt2-3.5.0-alpha03-5252756-osx.jar/d3ea99fc2d1356bcc9bc022a544dfd8b/aapt2-3.5.0-alpha03-5252756-osx/aapt2 link -I\ /Users/someguy/Library/Android/sdk/platforms/android-26/android.jar\ --manifest\ /Users/someguy/projects/third/someapp/android/app/build/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\ -o\ /Users/someguy/projects/third/someapp/android/app/build/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_\ -R\ @/Users/someguy/projects/third/someapp/android/app/build/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\ --auto-add-overlay\ --java\ /Users/someguy/projects/third/someapp/android/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\ --proguard-main-dex\ /Users/someguy/projects/third/someapp/android/app/build/intermediates/legacy_multidex_aapt_derived_proguard_rules/debug/processDebugResources/manifest_keep.txt\ --custom-package\ com.someapp\ -0\ apk\ --output-text-symbols\ /Users/someguy/projects/third/someapp/android/app/build/intermediates/symbols/debug/R.txt\ --no-version-vectors Daemon: AAPT2 aapt2-3.5.0-alpha03-5252756-osx Daemon #0Try: 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 5s 133 actionable tasks: 2 executed, 131 up-to-date
I've also double checked my AndroidManifest.xml file to see if I have any hanging brackets as suggested in this post
Upvotes: 0
Views: 729
Reputation: 1
I resolved this issue by adding androidXCore="1.6.0"
in myApp/android/build.gradle
to look like this
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
androidXCore="1.6.0"
Upvotes: 0
Reputation: 951
Did you run the bundle command?
sudo react-native bundle --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --dev false --reset-cache --assets-dest android/app/src/main/res/
And close the existing packager and re-open packager.
Upvotes: 0