Download the following installation bundle to get a recent stable release of the Flutter SDK:
flutter_linux_1.17.4-stable.tar.xz
Alternatively, check older and beta versions
Extract the file in a desired location, for example:
$ cd ~/Programs
$ tar xf ~/Downloads/flutter_linux_1.17.4-stable.tar.xz
Add the path to flutter binary to shell configuration file where
<path_to_flutter_dir>
with path to directory where flutter is extractedReplace <rc_file>
with specific shell configuration file which can be ~/.bashrc
or ~/.bash_profile
or ~/.zshrc
or ~/.zprofile
etc based on shell used by terminal
echo 'export PATH="$PATH:<path_to_flutter_dir>/flutter/bin"'|tee -a <rc_file>
For example, if flutter is extracted to /home/izaku/Programs
and rc file is ~/.bashrc
:
echo 'export PATH="$PATH:/home/izaku/Programs/flutter/bin"'|tee -a ~/.bashrc
Type source ~/.bashrc
(or appropriate shell-specific config file) to load the config into current shell
Verify that the flutter
command is available by running:
which flutter
Run the following command to see if there are any dependencies required to install (for verbose output, add -v
flag):
$ flutter doctor
This command checks environment and displays a report to the terminal window
For example:
[-] Android toolchain - develop for Android devices
• Android SDK at /Users/obiwan/Library/Android/sdk
✗ Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
• Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions
Once any missing dependencies is installed, run the flutter doctor
command again to verify that things are set up correctly
The flutter
tool uses Google Analytics to anonymously report feature usage statistics and basic crash reports
To disable reporting, type flutter config --no-analytics
To display the current setting, type flutter config
To update Flutter SDK use the flutter upgrade command:
flutter upgrade
This command gets the recent version of the Flutter SDK thatβs available on your current Flutter channel
Download Android Studio from https://developer.android.com/studio
Extract to a folder, copy-paste android-studio folder to a desired directory
Here its pasted to ~/android-studio (which is also /home/izaku/android-studio)
Start android studio like
~/android-studio/bin/studio.sh
Choose a "Custom" setup when prompted to select an installation type
Make sure the boxes next to following are checked (in case unable to, these can be installed later) :
Install the components
Building a React Native app with native code requires the Android 9 (Pie) SDK in particular, which can be installed through the SDK Manager in Android Studio
The SDK Manager can be accessed from one of following
if it shows welcome dialog
Configure β SDK Manageror else
Or
In SDK Manager
Under Android 9 (Pie) select
Android SDK Platform 28
Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image
It suggests Google APIs Intel x86 Atom System Image for Google Play support
Select SDK Tools tab
Expand Android SDK Build-Tools, and selct 28.0.3 if not
Click Apply and proceed to download and install the Android SDK and related tools
Click Finish
For systems which supports hardware virtualization, the user should have permission to /dev/kvm
Check if /dev/kvm
exists, and its permissions with ls -lah
If required, then make current user as owner of /dev/kvm
sudo chown izaku /dev/kvm
where izaku
is username
Configure the ANDROID_HOME environment variable
Add the following lines to your $HOME/.bashrc or $HOME/.bash_profile or $HOME/.zshrc or $HOME/.zsh_profile config file (or appropriate shell-specific config file) :
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
Type source $HOME/.bashrc
to load the config into current shell
Verify that ANDROID_HOME has been added to path by using echo $PATH
Check the actual location of the SDK in Android Studio Preferences β Appearance & Behavior β System Settings β Android SDK
Check Running a Flutter App
Download the following installation bundle to get a recent stable release of the Flutter SDK:
flutter_macos_1.17.4-stable.zip
For other release channels, and older builds, see the SDK archive page.
Extract the file in a desired location, for example:
cd ~/Programs
unzip ~/Downloads/flutter_macos_1.17.4-stable.zip
Add the path to flutter binary to shell configuration file where
Replace <path_to_flutter_dir>
with path to directory where flutter is extracted
Replace <rc_file>
with specific shell configuration file which can be ~/.bashrc
or ~/.bash_profile
or ~/.zshrc
or ~/.zprofile
etc based on shell used by terminal
echo 'export PATH="$PATH:<path_to_flutter_dir>/flutter/bin"'|tee -a <rc_file>
For example, if flutter is extracted to /Users/nc/Programs
and rc file is ~/.bashrc
:
echo 'export PATH="$PATH:/Users/nc/Programs/flutter/bin"'|tee -a ~/.bashrc
Type source ~/.bashrc
(or appropriate shell-specific config file) to load the config into current shell
Verify that the flutter
command is available by running:
which flutter
Run the following command to see if there are any dependencies required to install (for verbose output, add -v
flag):
$ flutter doctor
This command checks environment and displays a report to the terminal window
For example:
[-] Android toolchain - develop for Android devices
• Android SDK at /Users/obiwan/Library/Android/sdk
✗ Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
• Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions
Once any missing dependencies is installed, run the flutter doctor
command again to verify that things are set up correctly
The flutter
tool uses Google Analytics to anonymously report feature usage statistics and basic crash reports
To disable reporting, type flutter config --no-analytics
To display the current setting, type flutter config
To update Flutter SDK use the flutter upgrade command:
flutter upgrade
This command gets the recent version of the Flutter SDK thatβs available on your current Flutter channel
To develop Flutter apps for iOS, a Mac is required with Xcode installed
Configure the Xcode command-line tools to use the newly-installed version of Xcode by running the following from the command line:
sudo xcodebuild -runFirstLaunch
sudo xcodebuild -license
from the command lineCocoaPods is a dependency manager for Swift and Objective-C Cocoa projects, required to run iOS application
Install and set up CocoaPods by running the following commands:
sudo gem install cocoapods
pod setup
To prepare to run and test Flutter app on the iOS simulator, follow these steps:
On Mac, find Simulator via Spotlight or by using the following command:
open -a Simulator
Start a simulator of a 64-bit device (iPhone 5s or later) by navigating to Hardware β Device menu
Check Running a Flutter App