gpt4 book ai didi

ios - 我无法使用 Expo 在 iOS 中测试我的应用程序

转载 作者:行者123 更新时间:2023-11-29 00:00:29 27 4
gpt4 key购买 nike

当我尝试在装有 iOS 的手机上运行我的应用程序时遇到了一些问题,但在 Android 手机上没有这个问题。我在 Sublime Text 中编码,而不是在 XDE 中,并在终端中执行我的项目,使用命令 npm start 并读取 QR 码。我在 Windows 10 中编码。我使用 create-react-native-app

构建项目

出现的错误是

C:/Users/adria/Desktop/App/src/Imgs/image.png: Cannot find module 'C:/Users/adria/Desktop/App/node_moduless/expo/tools/hashAssetFiles'

第一次我确实认为图像名称或目录错误,然后我转到代码并证明它是正确的。所以,我决定在我的 Android 中尝试,令我惊讶的是,它可以正常工作。`

我的项目:[ https://snack.expo.io/HyKP1hyjz][1]

我的package.json

{ 
"name": "App",
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-native-scripts": "1.11.1",
"jest-expo": "25.0.0",
"react-test-renderer": "16.2.0"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js" },
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^25.0.0",
"react": "16.2.0",
"react-native": "0.52.0",
"react-navigation": "^1.5.8"
}
}

我尝试从我的项目中删除图像并尝试再次运行,但遇到了同样的问题,但使用了来自 react-navigation 的另一个图像

C:\Users\adria\Desktop\App\node_modules\react-navigation\src\views\assets\back-icon.png

最佳答案

您需要安装exponent 包,请参阅:https://github.com/expo/expo/issues/72

关于ios - 我无法使用 Expo 在 iOS 中测试我的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49621058/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com