- Install package
doas xbps-install openjdk openjdk17
- change java version
doas xbps-alternatives -s openjdk17
- after extract tar flutter move in /opt/flutter
doas mv ~/Downloads/flutter /opt
- make group
doas groupadd flutter
doas gpasswd -a $USER flutter
doas chown -R :flutter /opt/flutter
doas chmod -R g+w /opt/flutter/
- make folder for android-sdk
doas mkdir /opt/android-sdk/cmdline-tools/ -p
- after that move cmdline-tools folder to /opt/android-sdk/cmdline-tools/latest/
doas mv ~/Downloads/cmdline-tools /opt/android-sdk/cmdline-tools/latest/
doas groupadd android-sdk
doas gpasswd -a $USER android-sdk
doas setfacl -R -m g:android-sdk:rwx /opt/android-sdk
doas setfacl -d -m g:android-sdk:rwX /opt/android-sdk
note: if command setfact not found install package acl, acl-devel, acl-progs
# flutter
export FLUTTER_ROOT="/opt/flutter/"
export PATH="$FLUTTER_ROOT/bin:$PATH"
export CHROME_EXECUTABLE=/usr/bin/firefox
# android-sdk
export ANDROID_SDK_ROOT='/opt/android-sdk'
export PATH="$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$PATH"
export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH"
export PATH="$ANDROID_ROOT/emulator:$PATH"
- next update your PATH
source ~/.bash_profile
- sdkmanager
sdkmanager --list
- install android
sdkmanager --install "system-images;android-29;default;x86"
sdkmanager --install "platforms;android-29"
sdkmanager --install “platform-tools”
sdkmanager --install "build-tools;29.0.3"
sdkmanager --install "cmdline-tools;latest"
sdkmanager --licenses
If need
sdkmanager --sdk_root=/opt/android-sdk/cmdline-tools/latest
flutter config --android-sdk /opt/android-sdk/
- add android licenses
flutter doctor --android-licenses
check if got error
flutter doctor -v
Setup flutter environment in arch linux
Install Flutter Without Android Studio on Linux 2024