3
4

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 で新しくプロジェクトを作ろうとしたらエラーが出て困った

Last updated at Posted at 2020-01-07

起こったこと

開発 PC が変わったので AndroidStudio で Flutter の環境を作ろうと思い、インストール、プロジェクト作成と進めたのですが次のエラーが出てプロジェクトの作成に失敗してしまいました。

Could not find an option named "androidx". Run 'flutter -h' (or 'flutter -h') for available flutter commands and options.

意外と情報が少なく無駄に時間を要したので、メモしておきます。

なお、インストール作業は自分の 過去記事 を参考にしながら進めていました。

解決方法

どうやら Flutter の SDK バージョンが複数インストールされている場合などに起こるようで(いつ入れたか記憶にない……)、次のコマンドを打てばエラーが解消します。

$ flutter channel stable
$ flutter upgrade

参考にしたサイト

:link: When I create a new project, I will report the following error #42812 | GitHub

3
4
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
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?