android - 更新 React Native(至 0.59.10)后,Assemble Release 构建失败
问题描述
将我的 react-native 版本从 0.58.0 更新到 0.59.10 后,我遇到了 assmlbe 发布版本的问题。
react-native run-ios
作品iOS 构建(在 BuddyBuild 上)有效
react-native run-android
在模拟器上 - 工作
但是当我想获得发布构建并运行命令时cd android && ./gradlew assembleRelease
- 构建失败。
我检查了链接,但我认为一切都正确链接。
我收到了这个错误:
> 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.
我能做些什么呢?
解决方案
我更新react-native-fcm
到版本 16.0.0。之后我做了这个命令:
rm -rf ios/Pods && rm -rf ios/build && cd ios && pod install
现在一切正常。
推荐阅读
- javascript - 如何使用 jQuery 删除一个类
- java - 编年史与编年史队列包
- python - 如何使用使用不同类型的多个字段的 graphene-django 和 Relay 创建自定义过滤器?
- windows - 如何在 Windows 10 上打开粘滞便笺?
- json - 如何在不跳过行的情况下写入从 json 转换为 csv 的数据
- flutter - 如何在 Flutter 的消息中实现用户提及?
- javascript - 从 MuiCollapse-wrapper 中移除 display flex 属性
- java - 为什么我无法将NavigationOnClickListener 设置为工具栏?
- reactjs - Reactjs 搜索/过滤功能
- flutter - 在 iOS 模拟器键盘上按 enter/return 按钮不存储 TextField onChanged 数据 为什么?