Flutter requires the Rosetta translation environment

一般是 SDK 裏面的工具還是舊的,沒有適配 Apple ARM 平臺,所以在 iOS/iPad 上面調試的時候會出現下面的報錯,讓我們裝兼容層:

Installing and launching...
The Dart VM Service was not discovered after 60 seconds. This is taking
much longer than expected...
Installing and launching...                                              227.0s
0.5
0.5
Error: Flutter failed to run
"/Users/bgzo/fvm/versions/3.41.9/bin/cache/artifacts/libusbmuxd/iproxy
49822:49622 --udid 00008130-000131EC1091401C".
The binary was built with the incorrect architecture to run on this
machine.
If you are on an ARM Apple Silicon Mac, Flutter requires the Rosetta
translation environment. Try running:
  sudo softwareupdate --install-rosetta --agree-to-license

臥槽,怎麼可能,我們只需要幹掉這個 x86 的包即可:

which iproxy

mv /Users/bgzo/fvm/versions/3.41.9/bin/cache/artifacts/libusbmuxd/iproxy /Users/bgzo/fvm/versions/3.41.9/bin/cache/artifacts/libusbmuxd/iproxy.bak

ln -s /opt/homebrew/bin/iproxy /Users/bgzo/fvm/versions/3.41.9/bin/cache/artifacts/libusbmuxd/iproxy

重新起服務

fvm flutter run

Source via: https://note.bgzo.cc/weekly/20260505-flutter-requires-the-rosetta-translation-environment

posted @ 2026-05-06 00:09  菜就多練練  阅读(15)  评论(0)    收藏  举报