bhanu priya
bhanu priya

Reputation: 55

expo go app works fine but Eas build app is crashing on actual device(expo sdk "expo": "~47.0.12",)

index.js

import { registerRootComponent } from 'expo';

import App from './App';

// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);

package.json
{
  "name": "armstrongmobileapp",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@expo/metro-config": "^0.5.2",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/cli-platform-android": "^10.1.3",
    "@react-native-community/datetimepicker": "6.5.2",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-navigation/drawer": "^5.11.4",
    "@react-navigation/material-bottom-tabs": "^5.3.10",
    "@react-navigation/native": "^5.8.10",
    "@react-navigation/stack": "^5.12.8",
    "@shedaltd/react-native-azure-ad-2": "^2.0.1",
    "deprecated-react-native-prop-types": "^4.0.0",
    "expo": "~47.0.12",
    "expo-cli": "^5.2.0",
    "expo-constants": "~14.0.2",
    "expo-file-system": "~15.1.1",
    "expo-linear-gradient": "~12.0.1",
    "expo-random": "~13.0.0",
    "expo-screen-orientation": "~5.0.1",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "expo-web-browser": "~12.0.0",
    "i18next": "^21.9.1",
    "patch-package": "^6.5.1",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-i18next": "^11.18.0",
    "react-native": "0.70.5",
    "react-native-animatable": "^1.3.3",
    "react-native-chart-kit": "^6.12.0",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-get-random-values": "~1.8.0",
    "react-native-gradle-plugin": "^0.71.14",
    "react-native-maps": "1.3.2",
    "react-native-openanything": "0.0.6",
    "react-native-pager-view": "6.0.1",
    "react-native-paper": "^4.6.0",
    "react-native-pure-chart": "0.0.24",
    "react-native-reanimated": "~2.12.0",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "~3.18.0",
    "react-native-select-dropdown": "^1.8.0",
    "react-native-stars": "^1.2.2",
    "react-native-svg": "13.4.0",
    "react-native-tab-view": "^3.1.1",
    "react-native-vector-icons": "^7.1.0",
    "react-native-web": "~0.18.9",
    "react-native-webview": "11.23.1",
    "react-redux": "^7.2.2",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0",
    "rn-pdf-reader-js": "^4.1.1"
  },
  "devDependencies": {
    "@babel/core": "^7.17.5"
  },
  "private": true
}

package.json file { "name": "abc", "version": "1.0.0", "scripts": { "start": "expo start --dev-client", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@expo/metro-config": "^0.5.2", "@react-native-async-storage/async-storage": "~1.17.3", "@react-native-community/cli-platform-android": "^10.1.3", "@react-native-community/datetimepicker": "6.5.2", "@react-native-community/masked-view": "^0.1.11", "@react-navigation/drawer": "^5.11.4", "@react-navigation/material-bottom-tabs": "^5.3.10", "@react-navigation/native": "^5.8.10", "@react-navigation/stack": "^5.12.8", "@shedaltd/react-native-azure-ad-2": "^2.0.1", "deprecated-react-native-prop-types": "^4.0.0", "expo": "~47.0.12", "expo-cli": "^5.2.0", "expo-constants": "~14.0.2", "expo-file-system": "~15.1.1", "expo-linear-gradient": "~12.0.1", "expo-random": "~13.0.0", "expo-screen-orientation": "~5.0.1", "expo-splash-screen": "~0.17.5", "expo-status-bar": "~1.4.2", "expo-web-browser": "~12.0.0", "i18next": "^21.9.1", "patch-package": "^6.5.1", "react": "18.1.0", "react-dom": "18.1.0", "react-i18next": "^11.18.0", "react-native": "0.70.5", "react-native-animatable": "^1.3.3", "react-native-chart-kit": "^6.12.0", "react-native-gesture-handler": "~2.8.0", "react-native-get-random-values": "~1.8.0", "react-native-gradle-plugin": "^0.71.14", "react-native-maps": "1.3.2", "react-native-openanything": "0.0.6", "react-native-pager-view": "6.0.1", "react-native-paper": "^4.6.0", "react-native-pure-chart": "0.0.24", "react-native-reanimated": "~2.12.0", "react-native-safe-area-context": "4.4.1", "react-native-screens": "~3.18.0", "react-native-select-dropdown": "^1.8.0", "react-native-stars": "^1.2.2", "react-native-svg": "13.4.0", "react-native-tab-view": "^3.1.1", "react-native-vector-icons": "^7.1.0", "react-native-web": "~0.18.9", "react-native-webview": "11.23.1", "react-redux": "^7.2.2", "redux": "^4.0.5", "redux-thunk": "^2.3.0", "rn-pdf-reader-js": "^4.1.1" }, "devDependencies": { "@babel/core": "^7.17.5" }, "private": true }

and index.js

import { registerRootComponent } from 'expo';

import App from './App';

// registerRootComponent calls AppRegistry.registerComponent('main', () => App); // It also ensures that whether you load the app in Expo Go or in a native build, // the environment is set up appropriately registerRootComponent(App);

Upvotes: 1

Views: 909

Answers (2)

Ons Jannet
Ons Jannet

Reputation: 367

Hello i had the same experience, just open the apk in Android Studio it crashes check the logs it will tell you what's causing it also several reasons could cause the issue for example it happened to me one time the expo go worked fine, the apk itself worked fine in all testing phones but one turned out I was using Webview and the phone itself needed Webview update

Upvotes: 1

Ethical Programmer
Ethical Programmer

Reputation: 1

If your Expo app is crashing when built, but it works fine in Expo Go, there could be several reasons for this issue. Here are a few things you can try to troubleshoot the problem:

Clear the app cache: Sometimes, app crashes can be caused by a corrupted cache. You can try clearing the cache of your built app by running the following command in your project directory:

Upvotes: -2

Related Questions