我无法运行我的应用程序在我的模拟器以及device.Earlier,它是工作的。
我已经尝试过这个博客中提到的每一个步骤。
我的package.json是
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"android-windows": "react-native bundle --platform android --dev false --entry-file App.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && react-native run-android",
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"debugWindow": "start 'rndebugger://set-debugger-loc?host=localhost&port=8081'",
"debugLinux": "open 'rndebugger://set-debugger-loc?host=localhost&port=8081'"
},
"dependencies": {
"expo": "^31.0.4",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.1.tar.gz",
"react-navigation": "^3.0.8"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0"
},
"private": true
}而App.json是
{
"expo": {
"name": "AwesomeProject",
"slug": "AwesomeProject",
"privacy": "public",
"sdkVersion": "31.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}我试过运行npm install 2-3次,但似乎没有任何效果。
我不明白为什么选项32.0.0在这个链接上没有发布说明。世博升级
发布于 2020-05-12 19:55:15
在你的package.json里
变出
"expo": "^31.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz",至
"expo": "^32.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",删除node_module文件夹和package-lock.json文件
那就跑
npm ihttps://stackoverflow.com/questions/54059003
复制相似问题