[Android] Release apk crashes on app start (React Native 0.58.0)
See original GitHub issueEnvironment
System: OS: Ubuntu 18.04.1 LTS CPU: Intel® Core™ i5-4440 CPU @ 3.10GHz × 4 Memory: 15,6 GiB Binaries: Node: 10.10.0. Npm: 6.4.1. Watchman: 4.9.0 IDEs: Android Studio: 3.0 AI-171.4443003
npmPackages:
"dependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.1.2",
"@babel/polyfill": "^7.0.0",
"@babel/runtime": "^7.0.0",
"arc": "^0.1.1",
"axios": "^0.16.2",
"babel-plugin-transform-remove-console": "^6.8.5",
"debounce-promise": "^3.1.0",
"deepmerge": "^2.1.1",
"kdbush": "^3.0.0",
"lottie-react-native": "^2.3.2",
"metro-react-native-babel-preset": "^0.45.1",
"moment": "^2.21.0",
"moment-timezone": "^0.5.14",
"prop-types": "^15.6.0",
"react": "^16.2.0",
"react-mixin": "^4.0.0",
"react-native": "^0.58.0",
"react-native-animatable": "^1.3.0",
"react-native-calendars": "^1.19.3",
"react-native-device-info": "^0.17.3",
"react-native-fcm": "^11.0.1",
"react-native-geojson": "^0.1.1",
"react-native-gesture-handler": "^1.0.12",
"react-native-google-analytics": "^1.3.2",
"react-native-highcharts": "https://github.com/rahmanmarija/react-native-highcharts",
"react-native-image-picker": "^0.26.10",
"react-native-linear-gradient": "git+https://github.com/react-native-community/react-native-linear-gradient.git",
"react-native-maps": "https://github.com/rahmanmarija/react-native-maps",
"react-native-modal-dropdown": "^0.4.4",
"react-native-orientation": "https://github.com/manotnemanja/react-native-orientation",
"react-native-progress": "^3.5.0",
"react-native-simple-gauge": "https://github.com/manotnemanja/react-native-simple-gauge",
"react-native-sortable-list": "https://github.com/rahmanmarija/react-native-sortable-list",
"react-native-splash-screen": "3.0.6",
"react-navigation": "1.0.0-beta.19",
"react-redux": "^5.0.5",
"react-static-container": "^1.0.1",
"react-timer-mixin": "^0.13.3",
"redux": "^3.7.1",
"redux-saga": "^0.15.4",
"reselect": "^3.0.1"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/plugin-transform-react-constant-elements": "^7.0.0",
"@babel/runtime": "^7.3.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.4.2",
"babel-preset-react-native": "5.0.0",
"eslint": "^4.1.1",
"eslint-plugin-react": "^7.5.1",
"eslint-plugin-react-native": "^3.2.0",
"jest": "^23.6.0",
"@babel/preset-flow": "^7.0.0"
},
"jest": {
"preset": "react-native",
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
},
"transformIgnorePatterns": [
"node_modules/(?!react-native|react-navigation)"
],
"setupFiles": [
"<rootDir>/__mocks__/mocks.js"
],
"globals": {
"window": true
}
}
react-native run-android
working fine.
But i am getting this issue while running release apk on app start:
Fatal Exception: java.lang.RuntimeException: com.facebook.react.devsupport.JSException: Can't find variable: babelHelpers
at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:22)
at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:170)
at com.facebook.react.bridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:547)
at com.facebook.react.bridge.CatalystInstanceImpl.access$1000(CatalystInstanceImpl.java:44)
at com.facebook.react.bridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:563)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:764)
And this:
Caused by com.facebook.jni.CppException: Can’t find variable: babelHelpers
index.android.bundle:17:707
index.android.bundle:17:3756
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:16:53
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:15:49
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:82:49
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:81:43
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:65:92
_@index.android.bundle:2:1514
d@index.android.bundle:2:897
o@index.android.bundle:2:435
global code@index.android.bundle:1299:4
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:764)
Please help me with this issue. 😃 Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
React-native (Signed) release apk keeps crashing in device
You can get one from your device by plugging your phone into your computer, open the app so it crashes, then run adb...
Read more >Release APK crash immediately on launch - React Native ...
Release APK crash immediately on launch - React Native ( Version 0.58. 4) #23352. Bug Resolution: Locked.
Read more >Fixing React-Native android release build - wesionaryTEAM
Android release build crashes on launch but works fine in development mode. After months of research and development, your app is finally ready...
Read more >React Native Android release build crash on device - Medium
Now from your project's root folder navigate inside android folder. cd android. Now run the below command to generate your release APK. ./ ......
Read more >React Native Android: Release Build Keeps Crashing Since
Disabling the developer support mode As you might know, React Native has a developer support mode that is enabled when the app is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i have same issue @NemanjaManot did you solve it?
+1 in RN 0.59.9 and RN 0.59.10 aswell