I have built the APK and IPA using “expo build:android” and “expo build:ios” respectively. The app works well on Expo app and the IPA also worked on real devices after I submit it to AppStore Connect. But when I test the APK built, it just stuck at the splash screen. If I disconnect the Genymotion/AVD/Android device from network, it shows me
And if I look into LogCat, it also shows the error of “Unexpected token ‘.’”
Link to APK: https://expo.io/builds/3f31f8d0-5772-4428-9636-e8d1f167c9cc
I have already tried solutions provided in other similar topics, like using uglify-es:3.2.2 and etc. And they didn’t solve this issue.
My package.json is
{
"name": "sntwallet",
"version": "0.1.1",
"private": true,
"devDependencies": {
"@babel/preset-env": "^7.2.0",
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "6.24.1",
"jest-expo": "30.0.0",
"react-native-scripts": "1.14.0",
"react-test-renderer": "16.3.1"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest"
},
"jest": {
"preset": "jest-expo"
},
"resolutions": {
"uglify-es": "3.2.2"
},
"dependencies": {
"apsl-react-native-button": "^3.1.1",
"brorand": "^1.1.0",
"copy-to-clipboard": "^3.0.8",
"crypto-js": "^3.1.9-1",
"expo": "30.0.1",
"i18next": "^12.1.0",
"node-libs-browser": "2.1.0",
"numeral": "^2.0.6",
"react": "^16.6.3",
"react-bootstrap": "^0.32.4",
"react-dom": "^16.6.3",
"react-native": "0.55.4",
"react-native-fs": "^2.12.1",
"react-native-qrcode": "^0.2.7",
"react-native-randombytes": "^3.5.1",
"react-native-root-toast": "^3.0.1",
"react-native-size-matters": "^0.1.4",
"react-native-web3-webview": "^1.2.1",
"react-native-wkwebview-reborn": "^2.0.0",
"react-navigation": "^3.0.6",
"readable-stream": "^1.1.14",
"stream-browserify": "^1.0.0",
"uglify-es": "^3.2.2",
"web3": "1.0.0-beta.34",
"websocket": "^1.0.28",
"whatwg-url": "^7.0.0"
},
"react-native": {
"crypto": "react-native-crypto",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"stream": "stream-browserify"
},
"browser": {
"crypto": "react-native-crypto",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"stream": "stream-browserify"
}
}
my .babelrc is
{
"presets": [ "react-native"]
}