
Setting up Flutter for Android on Linux without Android Studio requires a few key tools.
First, you'll need to install the Flutter SDK, which can be done by running the command `sudo apt-get install flutter` in the terminal.
The SDK includes the necessary tools for building, running, and debugging Flutter apps.
Next, you'll need to set up the Android development environment, which includes the Android SDK and the Android NDK.
You can install these using the SDK Manager, which can be run by executing the command `flutter sdkmanager --list` in the terminal.
This will list the available packages, and you can then install the necessary packages using the `flutter sdkmanager` command.
To verify that everything is set up correctly, you can run a simple Flutter app using the command `flutter run`.
You might like: Create Flutter Project in Android Studio
Prerequisites
To get started with Flutter without Android Studio, you'll need to have a few things in place.
First, you'll need to download and add the Flutter Windows SDK to your environment variable. This is a crucial step, as it allows you to run Flutter on your Windows machine.
Here's an interesting read: Flutter Web Dev

Next, you'll need to install the latest Java JDK. As of my knowledge cutoff, the latest version is Java 20. Don't worry if you're not a Java expert - you can still use it with Flutter!
To ensure everything works smoothly, add the JAVA_HOME environment variable to your system settings. This will point your system to the Java installation, allowing you to use it with Flutter.
Here are the specific prerequisites you'll need to get started:
- Flutter Windows SDK downloaded and added to the environment variable.
- Install the latest Java JDK (ex: 20 as of writing it) and add JAVA_HOME environment variable.
Installation
To install Flutter, start by installing the Java Development Kit (JDK), which is required for both Flutter and the Android SDK.
You'll need to download the Eclipse Temurin JDK and install it as a local user installation. Find a JDK version that's compatible with your Android SDK platform version, although a proper compatibility table is hard to find.
To install the Flutter SDK, download it from the official website and extract it to a directory like ~/.local/share/flutter. Update your .bashrc file by adding the following line: export PATH="$PATH:$HOME/.local/share/flutter/bin". Then, reload your shell by running source ~/.bashrc.
Broaden your view: How to Android Studio Install
When setting up the Android SDK, download the sdkmanager tool from the Android Developers page and unzip it to a new folder. Move the contents of the extracted cmdline-tools folder into a new folder called latest, and then move the latest folder back to the cmdline-tools folder. Add the android_sdk/cmdline-tools/latest/bin folder to your PATH so you can use the sdkmanager utility.
Here are the packages you can install with the sdkmanager:
- platform-tools, which include the Android Developer Bridge (adb) used to connect to the device
- platforms, which install the specified Android platform, for example "platforms;android-34" installs Android with API level 34 (e.g. Android 14)
Install JDK
To install JDK, you'll need to download Eclipse Temurin JDK and install it as a local user installation. This is the recommended approach.
The JDK version you choose must be compatible with your Android SDK platform version. Unfortunately, a compatibility table is hard to find, but the Android docs offer some insight.
You can use a JDK version installed via a package manager, but this is not the recommended method.
A fresh viewpoint: Install Android Studio Debian 12
Installation
To install the Android SDK, you can download the Command-Line Tools instead of Android Studio. Extract the tools and move them to ~/.local/share/android-sdk/cmdline-tools/latest, ensuring the bin/ inside directory is correctly placed.
Broaden your view: Android Studio Ai Tools

First, update your .bashrc file with the following lines:
.bashrc
ANDROID_SDK_PATH="$HOME/.local/share/android-sdk"
export PATH="$PATH:$ANDROID_SDK_PATH/cmdline-tools/latest/bin"
export PATH="$PATH:$ANDROID_SDK_PATH/platform-tools"
export PATH="$PATH:$ANDROID_SDK_PATH/emulator"
export ANDROID_HOME="$ANDROID_SDK_PATH"
Then, reload your shell with the command source ~/.bashrc.
To install essential components, use the SDK manager with the command yes | sdkmanager "platform-tools" "emulator" "platforms;android-35" "build-tools;35.0.0" "system-images;android-35;google_apis_playstore;x86_64".
Alternatively, you can download the Android SDK using the Android SDK Command Line Tools. Set the ANDROID_HOME variable to point to the root of the Android SDK directory, for example, set ANDROID_HOME=C:\DeveloperTools\Android\SDK or export ANDROID_HOME=/opt/Android/sdk.
Next, invoke Android SDK command line tools to download the platform tools component with the command %ANDROID_HOME%\cmdline-tools\latest\bin\sdkmanager platform-tools or $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager platform-tools.
You can also download the basic Android command line tools and use the included sdkmanager to download other SDK packages.
To install the latest platform tools and the SDK, systemimages, run the command Accept the sdk licenses by y or Accept the licenses by sdkmanager --licenses.
The SDK itself is managed through a tool called sdkmanager, which can be downloaded from the Android Developers page. Unzip the downloaded SDK to a new folder, for example, android_sdk, and move the contents of the extracted cmdline-tools folder into a new folder called latest.
Related reading: Android Studio Line

Add the android_sdk/cmdline-tools/latest/bin folder to PATH, so you can use the sdkmanager utility. Then, run the command sdkmanager --list to see all the packages you can install.
To install platform tools, which include the Android Developer Bridge (adb, used to connect to the device), run the command sdkmanager "platform-tools". To install a specified Android platform, for example, "platforms;android-34", run the command sdkmanager "platforms;android-34".
If you encounter an issue with some Android licenses not accepted, run the command flutter doctor --android-licenses and accept the licenses to resolve it.
To install the Flutter SDK, download it from the official website and extract it to a directory like ~/.local/share/flutter.
Update your .bashrc file with the following line: .bashrcexport PATH="$PATH:$HOME/.local/share/flutter/bin".
Then, reload your shell with the command source ~/.bashrc.
To set up environment variables for Flutter, extract the SDK to a preferred location, for example, tar -xf flutter.zip -C C:\DeveloperTools\flutter or tar -xf flutter.tar.xz -C /opt/flutter.
Set the PATH variable to the bin of the Flutter directory and the FLUTTER_ROOT variable to the root of the Flutter directory.
For Windows, you need to execute Flutter for the first time as a non-admin non-root user. You may need to restart your command line if it is using administrator mode.
Finally, execute Flutter --doctor to detect the Android SDK and Java using the environmental variables.
To install JDK, choose a directory that does not require elevated privileges, such as C:\DeveloperTools\flutter.
Note: Do not install Flutter in a directory like C:\Program Files\@ that requires elevated privileges.
See what others are reading: Module Not Specified Android Studio
Setup
To get started with Flutter, you'll need to download and set up the Flutter SDK. Head to the Flutter SDK archive and download the Flutter SDK for your OS.
Extract the SDK to a preferred location, such as C:\DeveloperTools\flutter or /opt/flutter, using a command like tar -xf flutter.zip -C C:\DeveloperTools\flutter.
Now, set the PATH variable to the bin of the Flutter directory and the FLUTTER_ROOT variable to the root of the Flutter directory.
For another approach, see: Rad Studio 12.3 C Builder for Android
Download and Set Up Env Variables
To download the necessary tools, you'll need to start by setting up environment variables. Set ANDROID_HOME to point to the root of the Android SDK directory, for example, C:\DeveloperTools\Android\SDK or /opt/Android/sdk.
Download the Android SDK using the Android SDK Command Line Tools, which will also help you set up the environment variables. You can do this by invoking the Android SDK command line tools to download the platform tools component.
The platform tools contain ADB, which is needed for detecting connected Android devices. You can install the platform tools by running the command %ANDROID_HOME%\cmdline-tools\latest\bin\sdkmanager platform-tools or $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager platform-tools.
Broaden your view: Cross Platform App Development vs Native
Next, you'll need to download Flutter and set up its environment variables. Start by heading to the Flutter SDK archive and downloading the Flutter SDK for your OS. Extract the SDK to a preferred location, such as C:\DeveloperTools\flutter or /opt/flutter.
Set the PATH variable to the bin of the flutter directory and the FLUTTER_ROOT variable to the root of the flutter directory. For Windows, you may need to execute flutter as a non-admin user and restart your command line if it's using administrator mode.
Gradle Setup
To set up Gradle, start by extracting the Gradle zip file, in this case, the gradle-7.0-bin.zip file.
You can then move the extracted folder to a desired location on your computer, such as D:\Development\.
Your directory will look like this:
- gradle-7.0
- gradle
- bin
- init.d
- lib
Next, you'll need to update the path to include the Gradle bin folder, which is typically located at gradle-7.0\bin.
You might enjoy: Android Studio Gradle Jdk17
Development Tools
Using VS Code with the Flutter extension is a great way to set up a lightweight and efficient development environment. This allows you to avoid the bloat of Android Studio and focus on your project.
To keep your tools up to date, regularly use the flutter upgrade and sdkmanager commands. This ensures you have the latest features and bug fixes.
Here are the commands you can use:
- flutter upgrade
- sdkmanager
Tips for Development
Using VS Code with the Flutter extension is a great way to set up a lightweight and efficient development environment. This can help you avoid the bloat of Android Studio.
To get started, you can use the flutter upgrade command to regularly update your tools. This will ensure you have the latest versions of Flutter and the SDK manager.
Here are some key steps to follow:
- Use VS Code with the Flutter extension.
- Regularly update your tools using flutter upgrade and sdkmanager commands.
By following these steps, you can streamline your development environment and improve your workflow.
Command Line Tools
Command Line Tools can be a great alternative to Android Studio for developers who prefer a lightweight setup. You can download the basic Android command line tools, which include the sdkmanager to download other SDK packages.
To get started, extract the commandlinetools-win-6858069_latest.zip file. Then, navigate to the android_sdk\cmdline-tools\tools\bin directory, where you'll find some batch files.
To install the latest platform tools and SDK components, run the command sdkmanager platform-tools in your command prompt or shell. This will download and install the necessary tools, including adb and fastboot.
Related reading: How to Download Youtube Videos on Android without Premium
You can also use the sdkmanager to download other SDK packages, such as system images. To do this, simply run the command sdkmanager system-images;android-35;google_apis_playstore;x86_64, replacing the version number and package name with the ones you need.
Here's a quick rundown of the basic steps to get started with Command Line Tools:
Remember to regularly update your tools using the flutter upgrade and sdkmanager commands to ensure you have the latest versions.
Environment
To get started with Flutter without Android Studio, you'll need to set up your environment variables correctly. Download Flutter and extract the SDK to a preferred location, for example, C:\DeveloperTools\flutter or /opt/flutter.
To set the PATH variable, simply navigate to the bin of the flutter directory. For Windows, you'll need to execute flutter for the first time as a non-admin user and restart your command line if necessary. Now simply execute flutter --doctor.
Flutter should detect Android SDK and Java using the environmental variables. You can also update the path for Android SDK by setting the ANDROID_HOME and ANDROID_SDK_ROOT variables. If ANDROID_HOME is defined and contains a valid SDK installation, its value is used instead of the value in ANDROID_SDK_ROOT. If ANDROID_HOME is not defined, the value in ANDROID_SDK_ROOT is used.
Here's a quick reference for setting up your environment variables:
Set Up Java Environment
To set up your Java environment, start by downloading the correct version of Java. You'll want to choose an LTS version, which has been released for at least 18 months, to ensure proper compilation with Android.
There are many Java distributions to choose from, including Adoptium's build of OpenJDK, Microsoft's build of OpenJDK, and Jetbrains Runtime. However, I recommend avoiding the OpenJDK.org distribution due to its lack of security updates past the .2 release.
To download and extract the Java distribution, use a command like `tar -xf ibm-semeru-open-jdk_x64_windows.zip -C C:\DeveloperTools\Java` for Windows or `tar -xJf ibm-semeru-open-jdk_x64_linux.tar.gz -C /opt/java17/` for Linux/macOS.
Next, set the PATH and JAVA_HOME environment variables. PATH should be appended with the path to the Java's bin directory, while JAVA_HOME should be the root directory of the Java location.
Here are some options to consider for your Java distribution:
- Adoptium’s build of OpenJDK
- Microsoft’s build of OpenJDK
- Jetbrains Runtime
- Eclipse OpenJ9
Remember to always use an LTS version of Java, and the highest LTS version that has been released for at least 18 months, to ensure proper compilation with Android.
Update the Path
Updating the path for Android SDK is a crucial step in setting up your environment.
The ANDROID_HOME environment variable is deprecated, but it's still used in some cases. If you define ANDROID_HOME, its value is used instead of ANDROID_SDK_ROOT.
If ANDROID_HOME is not defined, the value in ANDROID_SDK_ROOT is used. However, if ANDROID_HOME is defined but doesn't exist or contain a valid SDK installation, the value in ANDROID_SDK_ROOT is used instead.
To update the path, you can set the ANDROID_HOME and ANDROID_SDK_ROOT environment variables. For example, you can set ANDROID_HOME to D:\Development\android_sdk and ANDROID_SDK_ROOT to the same value.
Here's a summary of the rules for using ANDROID_HOME and ANDROID_SDK_ROOT:
To set the environment variables, you can use the Edit environment variables for your account option.
Getting Started
To get started with Flutter without Android Studio, you'll need to create a new Flutter app. Create a new Flutter app using the command "flutter create fake_app".
Go to the fake_app directory and run the app using the command "flutter run".
You might encounter a Gradle build failed error due to a version mismatch. To fix this, open the fake_caller\android\gradle\wrapper\gradle-wrapper.properties file.
Change the distributionUrl URL to a Gradle version supported by your installed JDK, such as 8.1 or later.
Frequently Asked Questions
Is Android Studio mandatory for Flutter?
No, Android Studio is not mandatory for Flutter development. You only need the Android SDK, which can be downloaded and configured with Flutter.
Can I do Android development without Android Studio?
Yes, you can do Android development without Android Studio, but it's recommended to use it for a smoother experience. For more information on alternative deployment methods, see Build your app from the command line.
Featured Images: pexels.com


