Flutter Commands Cheat Sheet



Getting Flutter and Android working together is no small feat.

  1. Flutter Layout Cheat Sheet
  2. Flutter Commands Cheat Sheet Printable

Linux may be a first-class citizen when it comes to developing with Flutter, but setting up Java, Android and the Android tool-chain can be a real hassle.

This blog post shows how get Flutter working with Android SDK without installing Android Studio.

Gluster Cheat Sheet Brick – is basic storage (directory) on a server in the trusted storage pool. Volume – is a logical collection of bricks. Cluster – is a. Prerequisites Working installations of: Dart & Flutter SDK Android SDK a working AVD emulator Commands Inside your Flutter project directory: List available emulators emulator -list-avds Start Flutter emulator flutter emulator -launch <name-of-emulator> Stop Emulator Android: adb emu kill Flutter Checks flutter doctor or flutter doctor -v You don’t need Android Studio but there. Amplify supports popular web frameworks including JavaScript, React, Angular, Vue, Next.js, and mobile platforms including Android, iOS, React Native, Ionic, Flutter. Get to market faster with AWS Amplify. Sharing here quick cheat sheet of Amplify CLI commands. Visit for more information. Flutter Cheat Sheet 2.pdf. Cd flutter app main folder idea. Flutter IntelliJ cheat sheet (Windows/Linux version) Core workf l ow Run: shift-F10 S t art w/ o breakpoi nt s. Debug: shift-F9 S t art w/ B reakpoi nt s. Rel oad: ctrl- Hot rel oad changes. T arget sel ect or Run/ Debug uses t he t arget sel ect or: Flutter. T o add a shel l command: T o o l s Cr e a t e cmd l i n e l a u n ch e r 2. T o open f rom t ermi nal: cd flutter app main folder idea. Flutter IntelliJ cheat sheet (MacOS version) Core workf l ow Run: ctrl-r S t art w/ o breakpoi nt s. Debug: ctrl-d S t art w/ B reakpoi nt s.

Android Studio is a fully-fledged IDE. If you want to use a different development editor (like Vim or VS Code), Android Studio is only good for eating space on your hard drive.

Arch Linux comes with the fabulous Arch package manager and the AUR, the Arch User Repository. The AUR offers dozens of useful packages which we can use to set up Android SDK.

Please be aware that you need around 7 GB of free disk space for Flutter and Android SDK.

Install Flutter⌗

Use the AUR for installing Flutter:

(yay enables you to install AUR packages.)

Choose Openjdk 8 or 10. Otherwise you’ll get an error with the Android tools:Failed to install android-sdk: “java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema”.

Fix Permissions⌗

Create a new group flutterusers, add the default user to the group, then change permissions on the folder /opt/flutter.

If you still get permission denied errors, you can also change the permissions of the /opt/flutter folder to your $USER:

Install Android SDK and Tools⌗

While we can avoid installing the heavy Android Studio program, we still need the SDK Manager.

You can install the SDK Manager command line tool as a standalone package. We also need the platform tools for the Android emulator and an SDK platform.

We need an Android platform, too. Either use the AUR:

Or use the sdkmanager (see below).

Add the following environment variables to your shell, see here:

Don’t forget to add this to your shell profile file (.bashrc or similar) to make the Android tools work across reboots.

In fish shell:

Fix User Permissions⌗

The AUR installs the Android tools into /opt/android-sdk. The directory has root permissions, so we’ll need to fix that:

You’ll probably also have to set up environment variables for ANDROID_SDK_ROOT and JAVA_HOME.

The Java version is under /usr/lib/jvm, in the case of version 10, it’s this:

Check find /usr/lib/jvm to see the exact path.

Don’t forget to add the environment variable to your bash profile file (.bashrc or similar).

For fish shell:

The variable ANDROID_SDK_ROOT should be set to /opt/android-sdk:

or

Android Emulator⌗

First, you’ll need to install the required Android image with sdkmanager:

Then install a system image, for example:

(If you didn’t install an Android platform via the AUR, use the sdkmanager to install a platform as well: sdkmanager --install 'platforms;android-29'.)

Now you can create an emulator:

Command

(Replace <name> with the name you want to give the emulator.)

See avdmanager for more infos.

Here’s a handy cheat sheet on GitHub.

You might get errors that “there is no space lift on device”. The error indicates that your /tmp folder is full: I am getting a no space left on device error.

Try clearing the folder or increase the available space in /tmp (instructions in link above).

Add the emulator path to your user paths, for example, in Bash:

(Adjust to your needs.)

In my setup, I added the platform-tools and emulator:

It seems like sdkmanager adds some paths automatically. Make sure to check your installation to see what’s required.

For example, the error “PANIC: Missing emulator engine program for ‘x86’ CPUS.” indicates that the emulator program is not in your path.

In fish, you can check your path variables like this:

In Bash, there is no $fish_user_path but the second command should work, too.

Run Android Emulator⌗

Run Flutter⌗

First, let’s check if you have accepted all licenses: flutter doctor --android-licenses.

Then run flutter doctor -v.

Flutter Layout Cheat Sheet

Ideally, everything should work except Android Studio.

If not, make sure that you have all necessary tools on your machine and that you’ve set the environment variables.

Recap⌗

Flutter create command

Flutter Commands Cheat Sheet Printable

Installing the Android toolchain without Android Studio can be very tricky if you don’t add the correct paths to your shell environment.

It’s also not easy to find out what you have to install and how to do it.

The above worked for me after spending a few hours. Time I’ll never get back.
Hopefully, this guide will help someone else (and if it’s only my future self).

Further Reading⌗