After updating my react-native version from 0.58.0 to 0.59.10 I have problem with assemlbe release build.
react-native run-ios
works
iOS build (on BuddyBuild) works
react-native run-android
on simulator - works
But when I want to get release build and run command cd android && ./gradlew assembleRelease
- build failed.
I checked linking, but I think everything is linked properly.
I got this error:
> Task :react-native-fcm:verifyReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-fcm:verifyReleaseResources'.
> 1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/myname/Documents/projects/my-project/node_modules/react-native-fcm/android/build/intermediates/res/merged/release/values/values.xml:1968: error: resource android:attr/fontVariationSettings not found.
/Users/myname/Documents/projects/my-project/node_modules/react-native-fcm/android/build/intermediates/res/merged/release/values/values.xml:1968: error: resource android:attr/ttcIndex not found.
error: failed linking references.
What I can do about this?
I updated react-native-fcm
to version 16.0.0. After that I did this command:
rm -rf ios/Pods && rm -rf ios/build && cd ios && pod install
And everything works now.
try
cd android && ./gradlew clean && cd .. && ./gradlew assembleRelease
Hope so it will help
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.