当应用程序正常执行时,它可以工作,但是当释放应用程序时,应用程序不会在手机上执行(应用程序已停止)。反应原生版本:这个包.json 文件:
* {
"name": "project",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"@babel/runtime": "^7.1.2",
"color": "^3.0.0",
"native-base": "^2.8.1",
"react": "^16.3.1",
"react-native": "^0.55.4",
"react-native-exit-app": "^1.0.0",
"react-native-restart": "0.0.6",
"react-native-send-intent": "^1.0.28",
"react-navigation": "^1.5.12"
},
"devDependencies": {
"babel-eslint": "^8.2.6",
"babel-jest": "22.4.3",
"babel-preset-react-native": "^4.0.0",
"eslint": "^4.19.1",
"eslint-plugin-react": "^7.10.0",
"jest": "22.4.3",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./assets/fonts/"
]
}
}*
使用的代码:React-native run-android --variant=release
或
$ 光盘安卓$ ./gradlew assembleRelease
我们可以围绕这一点做一些更详细的工作,理想情况下是堆栈跟踪(尽管我意识到这对于发布版本来说可能很棘手)。
我猜你的发布版本已经打开了"缩小"(proguard 混淆和可能的代码收缩)。崩溃可能是由于在此过程中重命名的方法(如果通过反射使用会导致崩溃)甚至被删除(再次导致崩溃)引起的。
祝你好运。如果您提供更多细节,您可能会获得更多见解。