[Flutter] Ubuntu 20.04 environment construction

Operating environment

$ cat /etc/os-release
VERSION="20.04.1 LTS (Focal Fossa)"
PRETTY_NAME="Ubuntu 20.04.1 LTS"

1. Install Flutter and pass it through

Linux install-Flutter (official documentation)

Create a "dev" directory in your home directory and move it with `` `cd```.

$ mkdir dev
$ cd dev

Clone flutter to the "dev" directory.

$ git clone https://github.com/flutter/flutter.git

Check the current path.

$ pwd

export PATH="$PATH:pwd/flutter/bin"

The official documentation explains how to pass the path like this. pwdThe path returned by the command「pwd」Copy and paste in the part.

Example: export PATH = "$ PATH: / home / haru / dev / flutter / bin"

Add this to bashrc. This time the editor uses VScode.

$ code ~/.bashrc
(With VScode.Open bashrc and read "export PATH"="$PATH:/home/haru/dev/flutter/bin"』Paste)
$ source ~/.bashrc

flutter doctorConfirm with.

$ flutter doctor

Screenshot from 2020-09-14 20-46-40.png

When the screen above appears, it is complete until you pass the pass.

2. Install Android Studio

Install Android Studio with "Ubuntu Software" Screenshot from 2020-09-14 20-47-35.png

Install and run. androidStudio.jpg

Go to Configure → Plugins at the bottom of the screen. FlutterPlugin.jpg Install the Flutter plugin. pulgin.png

After installing the plugin, you can start a new project from "Start new Flutter project". addflutter.jpg

Quit Android Studio once and accept the Android license with the following command. You will be asked for consent several times, so answer with "y".

$ flutter doctor --android-licenses
Warning: File /home/haru/.android/repositories.cfg could not be loaded.         
6 of 6 SDK package licenses not accepted. 100% Computing updates...             
Review licenses that have not been accepted (y/N)? y

3. Introduced Android emulator

After starting Android Studio, go to Configure → AVD Manager at the bottom of the screen. AVD.jpg CreateVirtualDevice device01.jpg

In this environment, if you select the one with Play Store, it freezes when the emulator starts, so I used Pixel 2 XL without Play Store. device02.jpg System Image uses Q (API29). Screenshot from 2020-09-14 21-27-39.png

Changed the Graphics item to "Software-GLES2.0".

Finally, check with ``` flutter doctor` ``.

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.3, on Linux, locale ja_JP.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Android Studio (version 4.0)
[✓] Connected device (1 available)

• No issues found!

Recommended Posts

[Flutter] Ubuntu 20.04 environment construction
Laravel environment construction (Ubuntu 18.04 LTS)
[Windows] WSL2 + Ubuntu + Node.js environment construction
[Java] Environment construction
Java environment construction
[Spring] Environment construction
Docker environment construction
Environment construction with Docker (Ubuntu20.04) + Laravel + nginx
Penronse environment construction [Windows]
Try running ScalarDB on WSL Ubuntu (Environment Construction)
[Environment construction] Eclipse installation
Rails Docker environment construction
Protobuf and gRPC C ++ environment construction on Ubuntu 18.04
Server construction procedure Ubuntu18.04 server
Use Flutter on Ubuntu
[Ubuntu 18.04] Environment construction for using PyTorch with RTX3090
Circle CI environment construction
java development environment construction
Java + Spring development environment construction with VirtualBox + Ubuntu (Xfce4)
Using Flutter on Ubuntu (Part 2)
Rails6 development environment construction [Mac]
[Spring Boot] Environment construction (macOS)
Rails engineer environment construction ruby2.7.1
EC-CUBE4 environment construction (local edition)
I tried node-jt400 (Environment construction)
Rails6 (MySQL, Ubuntu environment, Cloud9)
Rails environment construction Rails5.2.1 ruby2.5.1 Catalina
MySQL 5.7 (Docker) environment construction memo
Introduction to Metabase ~ Environment Construction ~
JavaFX environment construction in Java 13
Redmine (Docker) environment construction memo
[Docker] Rails 5.2 environment construction with docker
AtCoder Challenge Environment Construction (Java 8)
Offline environment construction Ruby edition
Docker × Spring Boot environment construction
[Super easy] Ruby environment construction
[Rails / MySQL] Mac environment construction
[Docker] postgres, pgadmin4 environment construction
React environment construction with Docker
Offline environment construction CentOS edition
[CCNA] Construction of Cisco device emulator environment (EC2 + Ubuntu + GNS3)
Case that gave up environment construction of react with ubuntu
Rails + MySQL environment construction with Docker
Node.js environment construction with Docker Compose
◆ Spring Boot + gradle environment construction memo
Environment construction for Servlet application development
Rails (postgeresql. Ubuntu environment), heroku deployment
Let's create Ubuntu environment with vmware
Environment construction with Docker for beginners
Ruby environment construction summary ~ mac version ~
Laravel + Docker Laradock usage environment construction
[Unity] Android development environment construction procedure
Make a language! (JavaCC environment construction)
Ruby on Rails 6.0 environment construction memo
Build a XAMPP environment on Ubuntu
Rails on Docker environment construction procedure
[Environment construction with Docker] Rails 6 & MySQL 8
CentOS8 + Anaconda 4.9.2 + jupyterhub environment construction procedure
[Java & SpringBoot] Environment Construction for Mac
Troublesome Rails environment construction flow [Windows 10]
[Environment construction] Uninstall rails from local