0

我一直在编写一个 React Native 应用程序,方法是在我的 android 设备上运行该应用程序:yarn start

我的应用程序已从 expo 中退出,但我仍在使用 expo 进行开发,并在 android 设备上使用 yarn start 它工作正常......我现在的问题是在我的 MacBook Pro 上的模拟器上运行它......

我目前没有自己的 ios 设备,因此需要通过 MacBook Pro 上的模拟器运行。我尝试通过模拟器运行 react native 应用程序:yarn run ios

但是,当我运行模拟器没有启动时,我收到以下错误:

yarn run v1.3.2
$ expo start --ios
┌─────────────────────────────────────────────────────────────────────────┐
│                                                                         │
│   There is a new version of expo-cli available (3.18.4).                │
│   You are currently using expo-cli 3.17.10                              │
│   Install expo-cli globally using the package manager of your choice;   │
│   for example: `npm install -g expo-cli` to get the latest version      │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘
Starting project at /Users/bliss/Documents/Coder/ReactNative/EjectedExpo/JyotishEject
Expo DevTools is running at http://localhost:19002
Could not get status from Metro bundler. connect ECONNREFUSED 127.0.0.1:19001
Connecting to Metro bundler failed.
Set EXPO_DEBUG=true in your env to view the stack trace.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

然后我通过运行尝试了android版本:yarn run android我得到了同样的错误....

如何解决这个问题?

我想通过模拟器尽快开始使用 ios 版本....

我现在尝试运行:expo start -c --ios

我收到以下错误:

Error running `xcrun simctl openurl booted myapp://127.0.0.1:19000`: An error was encountered processing the command (domain=NSOSStatusErrorDomain, code=-10814):
The operation couldn’t be completed. (OSStatus error -10814.)

Error running app. Have you installed the app already using Xcode? Since you are detached you must build manually. Error: xcrun exited with non-zero code: 194
Your native app is running at myapp://192.168.100.189:19000
4

0 回答 0