我通过以下特征创建应用:
"react": "16.8.6",
"react-native": "0.60.0",
"react-native-orientation": "^3.1.3",
当我想从我的应用程序构建apk时,出现此错误:
任务:反应本机取向:verifyRelease资源失败
失败:构建失败,并出现异常。
- 出了什么问题:
任务':react-native-orientation:verifyReleaseResources'的执行失败。
工人提出了1个例外:
com.android.builder.internal.aapt.v2.Aapt2Exception:Android资源链接失败
错误:找不到资源android:style / TextAppearance.Material.Widget.Button.Borderless.Colored。
错误:找不到资源android:style / TextAppearance.Material.Widget.Button.Colored。
/home/hossein/workspace/mobile/main/ChannelApp_upgraded/node_modules/react-native-orientation/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7:错误:资源android:找不到attr / colorError。
/home/hossein/workspace/mobile/main/ChannelApp_upgraded/node_modules/react-native-orientation/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11:错误:资源android:找不到attr / colorError。
/home/hossein/workspace/mobile/main/ChannelApp_upgraded/node_modules/react-native-orientation/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15:错误:样式属性“找不到android:attr / keyboardNavigationCluster。
/home/hossein/workspace/mobile/main/ChannelApp_upgraded/node_modules/react-native-orientation/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7:错误:Android资源:找不到attr / dialogCornerRadius。
/home/hossein/workspace/mobile/main/ChannelApp_upgraded/node_modules/react-native-orientation/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11:错误:资源android:找不到attr / dialogCornerRadius。/home/hossein/workspace/mobile/main/ChannelApp_upgraded/node_modules/react-native-orientation/android/build/intermediates/res/merged/release/values/values.xml:2734:错误:资源android:attr / fontStyle找不到。
/home/hossein/workspace/mobile/main/ChannelApp_upgraded/node_modules/react-native-orientation/android/build/intermediates/res/merged/release/values/values.xml:2735:错误:资源android:attr / font找不到。
/home/hossein/workspace/mobile/main/ChannelApp_upgraded/node_modules/react-native-orientation/android/build/intermediates/res/merged/release/values/values.xml:2736:错误:资源android:attr / fontWeight找不到。
(...以及许多其他“找不到资源”错误.....)
当我的本机版本是“ 0.57.7”时,我遇到了这些错误,但是由于我升级到了“ 0.60.0”,所以遇到了这些错误。
问题出在哪里,如何解决?