ios simulator android,How to open IOS Simulator in Android Studio for Flutter application

问题

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.

Installed the Flutter SDK.

So I am able to run Flutter app in Android Emulator. However, when I select IOS simulator**(Open iOS Simulator**) . It says this

Unable to find application named 'Simulator.app

I do not have any experience is XCode and I have not installed it in my Mac.

My questions are,

How do I install the Simulator?

Do I need the Xcode installed in Mac for running Simulator? (Does Simulator

come with Xcode)

My understanding was that installing the Flutter plugin in Android Studio will

import iOS simulator as well. Am I wrong?

I found similar question but did not get the clarity.

回答1:

You can also configure the Xcode command-line tools from Xcode by opening Preferences>Location and selecting it from dropdown.

After selecting Xcode version you can find iOS Simulator name in your Android Studio for flutter project.

回答2:

To install the simulator you have to install Xcode, simulator is not distributed as a standalone app. Once you have installed it follow this guide.

I was thinking that installing Flutter and Dart plugins will link IOS

simulator in Android Studio as well.

Yes once installed you can start the iOS simulator from Android Studio and run your flutter app from it but the simulator is only linked, you have to install it yourself.

回答3:

If iOS device not showing in an android studio then first open up simulator app in mac.

Open simulator app

after simulator is loaded, go to Hardware -> Device -> Manage Device

and uncheck the physical device and go to simulator tab and choose the required simulator and check it 'Show as run destination' and reload android studio.

It will start showing in android studio and now you can run your flutter app in both android and iOS.

Manage Device

回答4:

Basically, it needs to install brew package manager and some other dependencies. I got my problem solve by the following flutter doc page.

source: https://flutter.dev/docs/get-started/install/macos#update-your-path

回答5:

After a fresh install of Flutter and xCode, I had to restart my Mac in order to Flutter recognize the iOS Simulator. Probably something with config of older installations.

来源:https://stackoverflow.com/questions/55745783/how-to-open-ios-simulator-in-android-studio-for-flutter-application

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值