0
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 3 years have passed since last update.

windows 10でFlutter開発環境構築【Scoop使用】

Last updated at Posted at 2020-05-12

概要

なんか最近Flutterの記事をよく見かけるので、少し入門しようかなと思い、まずは環境構築についてまとめる。

自分は最近は「scoop」というパッケージ管理ソフトを利用しています。これについての記事は他を参照してください
https://qiita.com/StrayDog/items/69fb347cec6a003c0ff4)。

元々VS codeを入れていたので、それ以外の設定について示します。VS codeについては「Flutter」のプラグインをインストールしておいて下さい(これについてはとくに悩まなくて良いです)。Javaも必要ですが、これも同様です。

scoopバケット追加

scoopより、以下のbacketを追加して下さい。(参考:Scoopを使ったWindows環境構築のススメ - Super!!

  • extras
  • java

必要パッケージのインストール

scoopにて以下のパッケージを入れてください。

  • dart
  • android-sdk
  • android-studio
  • adb
  • adopt8-hotspot
  • flutter

Android studioの設定

Android studioを一度起動して下さい。問題がなければ正常に初期設定が終了します。もし、エラーが出た場合は、上記のパッケージが正常にインストールされているかを確認して下しさい。されていない場合は、「failed」と出ているので、一度アンインストールし、再度インストールして下さい。

その後、右上のfile->settings->pluginを選択し、「Flutter」のプラグインをインストールして下さい。

SharedScreenshot.jpg

ADVはAndroid Studioから入れてください(参考:Flutterの導入からVSCodeでAVDを作成するまで - 導入チェック編

動作テスト

ここでは簡単な動作テストについて記載します。動かない場合は、
Flutter doctor」コマンドをやると、FLutter環境が出来ているかを確認できます。

Dart

まずは簡単にdartのテストをして下さい。

main(){
  print("hello world");
}

Flutter

Android Studioでanrdoidの仮想環境をインストールして下さい(Android Studioの右上にあるAVD Managerからインストールできます)。

SharedScreenshot.jpg

その後、以下のコマンドを押下し、Flutterを使用してみます。

ここではVS codeでの利用例について示します。
まずはプロジェクトファイルを「ctrl+shift+P」でコマンドパネルを開き、「Flutter:new project」にてプロジェクトフォルダを作成して下さい。その後、右下のデバイス選択後に、実行するとサンプルアプリが実行されます。

SharedScreenshot.jpg

おわりに

本記事は覚書きなので、いくつか漏れがあるかもしれません。そのうちメンテナンスしたい。

0
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
0
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?