How to open iOS Simulator in Android Studio for Flutter application

前端 未结 9 1610
臣服心动
臣服心动 2021-01-12 01:37

Today I have started learning Flutter. I am using Android Studio in Mac. I have already

  • Configured the Flutter and Dart plugins in Android studio.
  • Inst
相关标签:
9条回答
  • 2021-01-12 02:32

    Firstly, you have to install Xcode on your MacBook to develop Flutter apps for iOS

    To prepare to run and test your Flutter app on the iOS simulator, follow these steps:

    1. On your Mac, find the Simulator via Spotlight or by using the following command:

      open -a Simulator
      
    2. Make sure your simulator is using a 64-bit device (iPhone 5s or later) by checking the settings in the simulator’s Hardware > Device menu.

    3. Depending on your development machine’s screen size, simulated high-screen-density iOS devices might overflow your screen. Grab the corner of the simulator and drag it to change the scale. You can also use the Window > Physical Size or Window > Pixel Accurate options if your computer’s resolution is high enough.

    0 讨论(0)
  • 2021-01-12 02:35

    For me, this error appeared after an update of Xcode. Starting Xcode fixed the issue. Xcode asked for "Install additional required components?" and after this finished, Android Studio recognized iOS simulator.

    0 讨论(0)
  • 2021-01-12 02:40

    If you don't need IDE debugger support, you can skip the overhead of launching it through the IDE, and instead simply launch the Flutter app from the command line.

    Once Simulator is running, run these 2 commands:

    1. flutter doctor - to verify the simulator is recognized by Flutter and no other emulators are running
    • You should see this in the output:      [✓] Connected device (1 available)
    1. flutter run - will deploy the app to the know emulator or simulator

    Thanks to: https://flutter.dev/docs/get-started/install/macos#create-and-run-a-simple-flutter-app

    0 讨论(0)
提交回复
热议问题