Reactjs 我无法在Android上的expo环境上运行React本机应用程序

Reactjs 我无法在Android上的expo环境上运行React本机应用程序,reactjs,react-native,react-native-android,expo,Reactjs,React Native,React Native Android,Expo,我无法在Android上的expo环境上运行React本机应用程序;在我的Android手机上运行Expo应用程序时,会抛出此错误: Something went wrong. 32.0.0 is not a valid sdk version. Options are 35.0.0, 34.0.0, 33.0.0, UNVERSIONED. 同样的应用程序在我的iOS手机上的Expo环境下也能完美运行 我从MAC启动“expo start”,并将两部手机连接到与MACBOOK PRO相同的W

我无法在Android上的expo环境上运行React本机应用程序;在我的Android手机上运行Expo应用程序时,会抛出此错误:

Something went wrong.
32.0.0 is not a valid sdk version. Options are 35.0.0, 34.0.0, 33.0.0, UNVERSIONED.
同样的应用程序在我的iOS手机上的Expo环境下也能完美运行

我从MAC启动“expo start”,并将两部手机连接到与MACBOOK PRO相同的WIFI

这是我的app.json文件:

{
  "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
    }
  }
}
{
  "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:react-native-gesture-handler@1.1.0",
    "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.json文件:

{
  "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
    }
  }
}
{
  "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:react-native-gesture-handler@1.1.0",
    "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"
  ]
}
我如何在Android上也能做到这一点?几天前,这个应用在我的Android手机上的expo上运行,直到我更新了一些软件包


我已经更新了一些东西,一些软件包,一个软件包,可能是这个Android expo应用程序无法运行的原因。

您使用的是过时的expo SDK和应用程序,SDK 32及以下版本不再维护

按照上面的说明去做,你应该准备好了


希望这有帮助

您使用的是过时的Expo SDK和应用程序,SDK 32及以下版本不再维护

按照上面的说明去做,你应该准备好了


希望这有帮助

您好,您在安卓手机上使用的是什么版本的expo客户端?我在安卓应用程序上删除并重新安装了expo客户端,所以我想这是最后一个,我现在要检查一下我手机上的android操作系统更新版本,它应该是最后一个看起来正常的版本删除你的节点模块文件夹并运行
warn install
npm install
,具体取决于你使用的版本。你的expo客户端已更新,最小sdk必须为33或更高。。您可以查看从Expo客户端删除SDK 31和32:阅读:升级您的AppHi您在android手机上使用的Expo客户端的哪个版本?我在android应用程序上删除并重新安装了Expo客户端,因此我假设这是最后一个,我现在要检查一下我手机上的android操作系统更新版本,它应该是最后一个看起来正常的版本删除你的节点模块文件夹并运行
warn install
npm install
,具体取决于你使用的版本。你的expo客户端已更新,最小sdk必须为33或更高。。您可以查看从Expo客户端删除SDK 31和32:阅读:升级您的应用程序