reactjs - 为什么在使用 expo 成功构建后 React Native 应用程序没有安装?
问题描述
成功构建 expo 应用程序后,它不会安装在任何手机中。 这可能很容易,但我已经尝试了所有我知道的方法来解决这个问题,但没有奏效。这是我一直在研究 react 以来最疯狂的经历...... 以下是我从安装应用程序到构建它所采取的步骤
- npm install expo-cli --global
- 博览会初始化我的新项目
- cd my-new-project => 世博会开始
- npm 安装 -g exp
- expo build:android //我选择“让 Expo 处理这个过程!”
这是我的 app.json
{
"expo": {
"name": "project",
"slug": "my-new-project",
"privacy": "public",
"sdkVersion": "35.0.0",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.project.test"
},
"android": {
"package": "com.project.test"
}
}
}
这是我的 package.json
{
"name": "project",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/samples": "~3.0.3",
"@expo/vector-icons": "^10.0.3",
"@react-navigation/web": "^1.0.0-alpha.9",
"expo": "^35.0.0",
"expo-asset": "^7.0.0",
"expo-constants": "^7.0.0",
"expo-font": "^7.0.0",
"expo-web-browser": "^7.0.0",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-gesture-handler": "~1.3.0",
"react-native-web": "^0.11.7",
"react-navigation": "^3.12.0"
},
"devDependencies": {
"babel-preset-expo": "^7.0.0",
"jest-expo": "^35.0.0"
},
"private": true
}
请问有什么帮助吗?
解决方案
在手机设置中找到开发者选项并禁用它,如上图所示。我就是这样解决我的。希望这对你有用。
推荐阅读
- python - 如何在 Openpyxl 中使用“COUNTIFS”
- java - 杰克逊反序列化内部集合
- julia - 如何在 Julia v1.0.3 中将浮点数转换为 Int
- css - semantic-ui-react 如何在网格内使用表单组
- python-3.x - 如果我将 2 个变量分开,我怎么能做到这一点,它总是四舍五入?
- python - Django:在表单中选择json文件并在视图中解析它
- html - 如何使用 HTML、CSS 和 Bootstrap 集中两个框
- php - Laravel 实时定位跟踪?
- git - 如何“忽略”远程仓库中的文件,以便在更新本地副本时不包含它们?
- arrays - Comparison of two arrays in Lazarus