我并不真的使用iPhone模拟器,所以我删除了Xcode。删除Xcode后,当我尝试运行应用程序时,我收到一个错误:
[chat_app] flutter pub get
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Running "flutter pub get" in chat_app...
The current Flutter SDK version is 0.0.0-unknown.
Because chat_app depends on firebase_auth >=0.5.0 which requires Flutter SDK version >=0.1.4, version solving failed.
pub get failed (1; Because chat_app depends on firebase_auth >=0.5.0 which requires Flutter SDK version >=0.1.4, version solving failed.)
exit code 1
有没有办法告诉Flutter跳过iOS构建,只为Android构建?
1条答案
按热度按时间slmsl1lt1#
当你创建项目时,你可以告诉Flutter使用--Platform选项为特定平台创建项目,如果你没有这样做,那么你必须选择仿真器作为要构建的目标设备,并且默认情况下它不会为IOS构建。