react-native 开发环境下正常,打生产环境包安装后,打开就直接奔溃

react-native 开发环境下正常,打生产环境包安装后,打开就直接奔溃
打包方式:按照官网说明,
环境:react-native 0.49 手机:小米4c
工程package.json:

{
    "name": "Cyt",
    "version": "0.0.1",
    "private": true,
    "scripts": {
        "start": "node node_modules/react-native/local-cli/cli.js start",
        "test": "jest"
    },
    "dependencies": {
        "antd-mobile": "^2.0.0",
        "jwt-decode": "^2.2.0",
        "moment": "^2.19.1",
        "object-assign": "^4.1.1",
        "prop-types": "^15.6.0",
        "rc-form": "^1.4.8",
        "react": "16.0.0-beta.5",
        "react-dom": "^16.0.0",
        "react-native": "0.49.3",
        "react-native-scrollable-tab-view": "^0.8.0",
        "react-native-storage": "^0.2.2",
        "react-navigation": "^1.0.0-beta.15"
    },
    "devDependencies": {
        "babel-jest": "21.2.0",
        "babel-plugin-import": "^1.6.2",
        "babel-preset-react-native": "4.0.0",
        "jest": "21.2.1",
        "react-test-renderer": "16.0.0-beta.5"
    },
    "jest": {
        "preset": "react-native"
    }
}

手机异常错误信息:

com.facebook.react.common.JavascriptException: undefined is not an object (evaluating 'o.View.propTypes.style'), stack:
<unknown>@493:850
i@2:565
n@2:348
t@2:210
<unknown>@491:299
i@2:565
n@2:348
t@2:210
<unknown>@490:135
i@2:565
n@2:348
t@2:210
<unknown>@488:282
i@2:565
n@2:348
t@2:210
<unknown>@12:315
i@2:565
n@2:278
t@2:210
global code@668:9

    at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:56)
    at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:40)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:363)
    at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
    at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
    at android.os.Handler.handleCallback(Handler.java:754)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
    at android.os.Looper.loop(Looper.java:163)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
    at java.lang.Thread.run(Thread.java:760)
阅读 2.9k
评论
    1 个回答
    • 3
    • 新人请关照

    一般这个问题是第三方包不兼容引起的,只能一个个去排除一下

      撰写回答

      登录后参与交流、获取后续更新提醒

      相似问题
      推荐文章