0
votes

I cannot run React Native app on expo environment on Android; it throws this error when running the app on Expo on my Android phone:

Something went wrong.
32.0.0 is not a valid sdk version. Options are 35.0.0, 34.0.0, 33.0.0, UNVERSIONED.

Same app works perfectly on Expo environment on my iOS phone.

I launch 'expo start' from my MAC and connect both phones to the same WIFI as my MACBOOK PRO.

Here is my app.json file :

{
  "expo": {
    "name": "travel-management-app",
    "slug": "travel-management-app",
    "description": "Travel management application",
    "privacy": "public",
    "sdkVersion": "32.0.0",
    "platforms": [
      "ios",
      "android"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "primaryColor": "#cccccc",
    "icon": "./assets/icons/bg_screen5_square.png",
    "splash": {
      "image": "./assets/icons/bg_screen5.png"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    }
  }
}

Here is my package.json file :

{
  "name": "travel-management-app",
  "version": "1.0.0",
  "description": "Travel management Application",
  "author": "Luchian Chivoiu",
  "private": true,
  "homepage": "https://www.sienna.ro",
  "main": "src/index.native.js",
  "dependencies": {
    "@babel/polyfill": "^7.2.5",
    "@expo/vector-icons": "^9.0.0",
    "expo": "^32.0.0",
    "expo-linear-gradient": "^3.0.0",
    "gh-pages": "^2.0.1",
    "lodash": "^4.17.4",
    "material-ui": "^0.20.2",
    "prop-types": "^15.7.2",
    "react": "16.5.0",
    "react-art": "^16.8.3",
    "react-autowhatever": "^10.2.0",
    "react-dom": "^16.8.3",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "react-native-autocomplete-input": "^4.1.0",
    "react-native-elements": "^1.0.0-beta8",
    "react-native-gesture-handler": "1.0.17",
    "react-native-gesture-handler-web": "npm:[email protected]",
    "react-native-keyboard-aware-scroll-view": "^0.9.1",
    "react-native-picker-select": "^6.3.3",
    "react-native-ratings": "^6.3.0",
    "react-native-touchable-scale": "2.0.0",
    "react-native-vector-icons": "^6.3.0",
    "react-native-web": "^0.10.0",
    "react-navigation": "^3.5.1",
    "react-navigation-animated-switch": "^0.2.1",
    "react-redux": "6.0.1",
    "react-scripts": "^2.1.5",
    "react-select": "^3.0.4",
    "redux": "^4.0.4",
    "redux-thunk": "^2.3.0"
  },
  "scripts": {
    "web": "react-app-rewired start",
    "native": "expo start",
    "build:web": "react-app-rewired build",
    "deploy": "gh-pages -d build",
    "build:android": "expo ba",
    "build:ios": "expo bi",
    "eject:web": "react-scripts eject",
    "eject:native": "expo eject",
    "prettify": "prettier --write 'src/**/*.js'",
    "clean-install": "rm -rf node_modules && npm cache clean --force && watchman watch-del-all && yarn"
  },
  "devDependencies": {
    "@babel/plugin-proposal-class-properties": "^7.3.4",
    "babel-preset-expo": "^5.0.0",
    "customize-cra": "^0.2.12",
    "prettier": "^1.15.3",
    "react-app-rewired": "^2.1.0"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}

package-lock.json contains this:

"react-native": {
      "version": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
      "integrity": "sha512-+taJh7bN2owmwaZpJUrNpHdmPAL6ZynNCZj15uLQgjaPFq0ZBIG2ZWuSJ48eGoUjAb3lrWxkmLlHb2eJFXc7sQ==",

How can I make this work on Android too? This app worked on expo on my Android phone some days ago until I did some package update.

I have updated something, some package , a package and maybe that made this Android expo app not able to run.

1
Hi what version of expo client are you using on your android phone? - harisu
I deleted and installed again the expo client on my android application so I assume is the last one, I am going to check now what version - Luchian Chivoiu
I also updated my android OS system on my phone so it should be the last one - Luchian Chivoiu
That looks ok Delete your node modules folder and run yarn install or npm install depending on which one you use. - harisu
Your expo client is updated and minimum sdk must be 33 or higher.. you can look at Dropping SDKs 31 and 32 from the Expo client: blog.expo.io/expo-sdk-35-is-now-available-beee0dfafbf4 read: Upgrading Your App - Oleg

1 Answers

2
votes

You are using an outdated Expo SDK and applications, SDK 32 and below is no longer maintained.

Follow the instructions on this link you should be good to go

Hope this Helps!