1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

既存のFlutterプロジェクトの導入で躓いたら確認するべきこと

1
Last updated at Posted at 2020-02-08

前提

DartをインストールしたあとにFlutterをインストールしている場合で発生しているので必ずしもこうなるかどうかはわかりません。

事象

既存のFlutterプロジェクトのリポジトリをcloneしてくるときに発生します。

Android Studioからプロジェクトを開くとエディタ上部にDart SDK is not configureという警告が出てきます。

このときOpen Dart Settingをクリックして、設定画面に行きDart SDK path:にDartのSDKのあるpathを指定すればいいはずです。

が、適切に指定しないと

Error running 'main.dart': Cannot find runner for main.dart

と怒られてしまいます。

このときには任意のDartのSDKのパスではなく、Flutterを導入した時に包含されているDartのSDKのパス{PATH_YOU_INSTALLED}/flutter/bin/cache/dart-sdk/を指定する必要があります。

もしかしたらこれで解決できるかもしれません。

参考:https://github.com/flutter/flutter/issues/40040

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?