gpt4 book ai didi

Flutter: XCode error "Unable to boot the Simulator"(颤动:Xcode错误“Unable to Boot the Simulator(无法启动模拟器)”)

转载 作者:bug小助手 更新时间:2023-10-24 17:10:56 28 4
gpt4 key购买 nike



Iam running the latest OSX/Flutter/XCode Versions using flutter, android studio and firebase and 1 hour ago everthing works perfectly.

我正在运行最新的OSX/Ffltter/XCode版本,使用Ffltter、Android Studio和Firebase,1小时前一切都运行得很完美。


Then i rebooted my macbook and when i try to launch an ios simulator i get this error "Unable to boot the simulator".

然后,我重启了我的MacBook,当我试图启动iOS模拟器时,我收到了这样的错误:“无法启动模拟器”。


The following steps shows no solution:

以下步骤没有显示任何解决方案:



  1. Reinstall the ios simulator

  2. Flutter clean and pub get

  3. Updating comand line tools 13.3.1 (13E500a)

  4. Run invalid cache of android studio


I found the problem also on stackoverflow but all sugestions does not working.

我在堆栈溢出上也发现了这个问题,但所有建议都不起作用。


Any ideas?

有什么主意吗?


更多回答

stackoverflow.com/a/72658637/5780058

Stackoverflow.com/a/72658637/5780058

优秀答案推荐

NO NEED TO UNINSTALL XCODE! Though I know the contributor already has solved the issue, I'm happy if this answer will help someone else.

不需要卸载Xcode!虽然我知道投稿人已经解决了这个问题,但如果这个答案能帮助其他人,我很高兴。



  1. Go to [About this Mac > Storage > Manage > Developer]

  2. Delete all the content (no worries!)



Step 1:
Go to About this Mac

第1步:转至关于此Mac


enter image description here


Step 2:
Go to Storage
enter image description here

第2步:转至存储


Step 3:
Delete all the content Or Delete XCode Cache

步骤3:删除所有内容或删除XCode缓存


enter image description here



You can delete xcode cache and it will work,

您可以删除Xcode缓存,它会起作用,


by going to

通过转到


About this Mac > Storage > Manage > Developer or any folder you choosed for development when installing xcode and flutter then Delete XCode Cache.

关于这个Mac>存储>管理>开发人员或任何你在安装Xcode时选择用于开发的文件夹,然后删除XCode缓存。



For Mac Ventura 13.0 OS and higher -> Click apple logo on top left of your Mac

对于Mac Ventura 13.0操作系统和更高版本->点击Mac左上角的Apple徽标


System Settings > search Storage > Developer

Then delete Xcode Caches

然后删除Xcode缓存


enter image description here



You can just clean your Xcode Caches, and that will do the trick,

您只需清理Xcode缓存,就可以做到这一点,



  1. About this Mac

  2. Storage

  3. Developer

  4. XCode Caches



Got this issue on MacBook Air M2, 2022 and solve it by the following.

我在MacBook Air M2,2022上遇到了这个问题,并通过以下方法解决了这个问题。


Go to System Settings --> General --> Storage --> Developer then clear the Xcode Cache.

进入系统设置-->常规-->存储-->开发人员,然后清除Xcode缓存。



For me it was not necessary to delete XCode. I could solve it with this:

对我来说,没有必要删除XCode。我可以用这个解决这个问题:


1: Click on "About this Mac" in the top left corner

1:点击左上角的“About This Mac”


2: Click on "Storage"-Tab

2:点击“存储”-选项卡


3: Click on "Manage"-Button

3:点击“管理”-按钮


4: Click on "Developer"-Tab

4:点击“开发者”-选项卡


5: Right click on all the data and "Delete"

5:在所有数据上点击鼠标右键并点击“Delete”



Simple steps:
You can just clean your Xcode Caches, and that will do the trick

简单的步骤:只需清理Xcode缓存,就可以做到这一点



  1. Open "About this Mac" from the Apple menu.

  2. Go to the "Storage" tab and click on 'manage'.

  3. Look for the "Developer" folder and open it.

  4. Inside the "Developer" folder, locate the "Xcode Caches" directory.

  5. Delete the contents of the "Xcode Caches" folder.

  6. Once the caches are cleared, try opening the Simulator again.


By following these steps, you can resolve certain issues related to the Simulator in Xcode

通过遵循以下步骤,您可以解决与Xcode中的模拟器相关的某些问题



Got this issue in M1 MB Air in 2023 Solved it by,

2023年在M1 MB Air中解决了这个问题,


Settings > Storage > Developer > Clear Xcode Cache.

设置>存储>开发人员>清除Xcode缓存。



Product-> Clean Build Folder works for me!

产品->Clean Build文件夹适合我!



Settings -> General -> Storage--> Developer--> Delete the Xcode Caches

设置->常规->存储-->开发人员-->删除Xcode缓存



This method works for me
You can just clean your Xcode Caches, and that will do the trick,
Go To About this Mac -> Storage -> Developer -> XCode Caches

这个方法对我很管用,你只需要清理你的Xcode缓存就行了,去About This Mac->Storage->Developer->XCode缓存



Try:

尝试:



  1. open terminal

  2. run brew install fastlane

  3. run fastlane snapshot reset_simulators
    This will recreate your simulators, and work the majority of the time.



For me it worked after opening XCode and installing ios.

对我来说,在打开XCode并安装iOS之后,它就起作用了。



  1. Start XCode

  2. Open a project or create one

  3. At the Top you find the 'Runner', and the words 'Any IOS Device'. Click on the second

  4. Manage Run Destinations

  5. Simulators

  6. Push the '+'

  7. 'OS Version: Download more simulator runtimes'

  8. find iOS and click on 'GET'



install "DevCleaner for xcode" from app store then choose option delete old Simulator & Device Logs after this it work

从应用商店安装“DevCleaner for Xcode”,然后选择选项删除旧的模拟器和设备日志




After checking some other comments, it seems uninstalling XCode is not necessary.



The issue is not directly related to Flutter but it is related to the XCode 13.3.1 with the Simulator, specially for iPhone and iPad (tvOS and watchOS should have no issue so far).

这个问题与颤动没有直接关系,但它与模拟器的XCode13.3.1有关,特别是针对iPhone和iPad(TVOS和WatchOS到目前为止应该没有问题)。


Somehow the existing files during the security update causes the simulator to get corrupted.

不知何故,安全更新期间的现有文件会导致模拟器损坏。


As temporary workaround, you can try the following steps:

作为临时解决办法,您可以尝试以下步骤:



  1. Uninstall XCode by moving from Applications folder to the Trash

  2. Empty the Trash

  3. Open the Mac Storage Management and go to the Developer in the sidebar

  4. Delete everything from the Developer Section

  5. Download Xcode 13.1 from Apple Developers and not the stable release from App Store

  6. Extract the downloaded Xcode_13.1.xip file, i actually recommend via terminal by using xip -x Xcode_13.3.1.xip, and take in mind the extraction uses 100GB and it takes up to 2 hours to complete. You are going to have this message at the beggining xip: signing certificate was "Software Update" (validation not attempted), but you can ignore since this is expected.

  7. Finally, move the extracted XCode file to the Applications folder

  8. Run sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

  9. Run sudo xcodebuild -runFirstLaunch


更多回答

This solution worked for me first time. Next day not worked. I am using flutter. So i built the app from xcode and issue fixed

这个解决方案第一次对我起作用了。第二天没上班。我正在使用扑翼。所以我用Xcode构建了这个应用程序,并修复了

If you're on MacOS >= 13.0 and "About this Mac" doesn't have a "Storage" tab, skip to this answer

如果您使用的是MacOS>=13.0,并且“关于这台Mac”没有“存储”选项卡,请跳到此答案

so, run project from direct xCode, it will open simulator automatically

所以,从直接Xcode运行项目,它会自动打开模拟器

This worked, thanks.

这招奏效了,谢谢。

Just clearing the developer caches did the job

只需清除开发人员缓存即可完成工作

How is this not featured as the answer? Your tips helped.

这怎么会不是答案呢?你的建议很管用。

Work also on Intel (MacBook Pro 2019 16')

也适用于英特尔(MacBook Pro 2019 16英寸)

This is a duplicate answer. Numerous other users have recommended this exact remedy, and this answer does not add anything substantive. Please only post answers when they contribute new content.

这是一个重复的答案。许多其他用户已经推荐了这个确切的补救方法,这个答案并没有增加任何实质性的东西。请仅在他们贡献新内容时发布答案。

Thank you it took a while, but it works now!

谢谢你花了一段时间,但现在起作用了!

Consider unmarking this as the answer since there are better answers @codesession

考虑取消将其标记为答案,因为有更好的答案@codesession

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