- Open Windows Terminal as Run as Administrator
- Run this command
git config --global --add safe.directory C:/flutter
- Close and open IntelliJ again.
- Go to IntelliJ Setting and check these..
- Language & Frameworks > Android SDK is set properly and show android sdk version
- If it's not, cliek
Edit
and it should find the installed version already and Next Next Next. - Language & Frameworks > Flutter SDK is set properly and show flutter version
- If Flutter SDK is not set, set it before Dart SDK
- Now check Language & Frameworks > Dart SDK, it should be automatically set and show dart version
- If it ask you about it can not find Android SDK version 29, you can set it to version 34. It was installed automatically with Android Studio yesterday.
- Google Chrome, install an Extension name Dart Debug Extension
- If you still can not run Flutter : Chrome(Web) target, go to Edit configurations. It's located next to Run button on toolbar, under the main.dart file name.
- Set the
Additional Run Argument
to-d web-server
now it should run successfully. You may still get a white blank page though. - Click the
http://localhost:#####
to open the browser and then click the Dart Debug Extension icon to refresh the page
- Windows ターミナルを 管理者として実行 として開きます
- このコマンドを実行します
git config --global --addsafe.directory C:/flutter
- IntelliJ を閉じて、再度開きます。
- IntelliJ 設定に移動し、これらを確認します。
- 言語とフレームワーク > Android SDK が適切に設定されている アンドロイド SDK バージョンを表示
- そうでない場合は、「編集」をクリックすると、すでにインストールされているバージョンと「次へ 次へ」が見つかるはずです。
- 言語とフレームワーク > Flutter SDK が適切に設定されている および Flutter バージョンを表示
- Flutter SDK が設定されていない場合は、Dart SDK より前に 設定してください
- ここで、[言語とフレームワーク] > [Dart SDK] を確認します。自動的に設定されるはずです Dart のバージョンが表示されます
- Android SDK バージョン 29 が見つからないというメッセージが表示された場合は、バージョン 34 に設定できます。昨日、Android Studio で自動的にインストールされました。
- Google Chrome、拡張機能名 Dart Debug Extension をインストールします
- それでも Flutter : Chrome(Web) ターゲットを実行できない場合は、構成の編集 に進みます。これは、ツールバーの [実行] ボタンの横、main.dart ファイル名の下にあります。
追加の実行引数
を-d web-server
に設定すると、正常に実行されるはずです。ただし、まだ白い空白ページが表示される場合があります。http://localhost:#####
をクリックしてブラウザを開き、Dart デバッグ拡張機能アイコンをクリックしてページを更新します。