react-native – React Native 0.57 Android应用程序在发布模式下启动时崩溃

因此问题在于我们需要使用更高版本的react进行构建,因此可以使用现在提交给Google Play的新应用所需的API级别26或更高版本构建.

似乎是在发布版本中没有正确加载babelHelper的问题.我只是不知道如何修复它,因为我发现的所有东西似乎都没有解决问题.崩溃应用程序的logcat在下面以供参考.

     E/ReactNativeJS: undefined is not a function (evaluating 'babelHelpers.applyDecoratedDescriptor(t.prototype,"notificationsEnabled",[Ve.serializable],{configurable:!0,enumerable:!0,writable:!0,initializer:null})')
09-17 12:32:48.301 11704-11758/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: com.***********, PID: 11704
    com.facebook.react.common.JavascriptException: undefined is not a function (evaluating 'babelHelpers.applyDecoratedDescriptor(t.prototype,"notificationsEnabled",[Ve.serializable],{configurable:!0,enumerable:!0,writable:!0,initializer:null})'), stack:
    <unknown>@820:1833

最佳答案 所以我用react-native提交了一个错误报告,得到了一个解决问题的响应.

https://github.com/facebook/react-native/issues/19955#issuecomment-421295617

基本上,新的变化淹没了一堆东西.他们将在以后的版本中解决问题,但有一个解决方法来手动强制所需的装饰器导入.我假设类似的解决方法可用于babelHelpers不能正确导入的其他问题.

点赞