Install Flutter on Archlinux
Getting Flutter and Android working together is no small feat.
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.
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.
Installtion
Install Flutter with yay
|
|
Fix Permissions
Create a new group flutterusers
, add the default user to the group, then change permissions on the folder /opt/flutter.
The group may have been created beforehand so you may not need to do this. It’s no harm in doing it again anyway.
|
|
If you still get permission denied errors, you can also change the permissions of the /opt/flutter
folder to your $USER
:
|
|
Install Android Studio
|
|
Install Needed Tools
You must install needed tools like: Android SDK Command-Line-Tools and Android SDK Platform-Tools
Install Java-8 (Optional)
Of course you can use Java 11 or higher for Flutter Development, but i recommend to use open-jdk8 because it’s stable now for Flutter
|
|
If you have other version of openjdk
installed, you may have to change the default Java environments.
First, try checking your default environment by using:
|
|
The output look like this:
|
|
If it’s not the case, then changing the environment:
|
|
Create Android Emulator
Verifying Flutter
Check if you have accepted all licenses:
flutter doctor --android-licenses
Then run flutter doctor
.
The output will look like this:
|
|
Flutter is successfully installed ^^
Troubleshoot
Again, if you get any trouble, feel free to contact me.
Credit
All rights and credits reserved to Ashpex.
I just rewrite and update the tutorials.
If you find my blog helpful, please consider sponsoring <3
Sponsor