简体   繁体   中英

Assemble Release build failed after update React Native (to 0.59.10)

After updating my react-native version from 0.58.0 to 0.59.10 I have problem with assemlbe release build.

  1. react-native run-ios works

  2. iOS build (on BuddyBuild) works

  3. 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM