Thursday, January 24, 2019

Installing Flutter and Android Studio on Fedora 29

Since neither Flutter nor Android Studio come as regular packaged applications, I am installing them under ~/opt/android. Android Studio installs the Android SDK at ~/Android/Sdk, and creates projects at ~/AndroidStudioProjects.

Download Flutter and Android Studio.

$ mkdir -p ~/opt/android

Android Studio installation

$ unzip ~/Downloads/android-studio-ide-182.5199772-linux.zip 'android-studio/*' -d ~/opt/android
$ cd ~/opt/android/android-studio/bin/
$ ./studio.sh

Follow the wizard accepting defaults.

Tools > Create Command-line Launcher, at ~/bin/studio.
Tools > Create Desktop Entry

I did not install the libraries that are said to be required (zlib.i686 ncurses-libs.i686 bzip2-libs.i686). So far they did not seem to be missed.

Set up the Android emulator. I added two virtual devices, both are Pixel 2 with API 28, Android 9.0 with Google Play. One is x86 and the other is x86_64. Not clear which one will give better performance.

Flutter installation

$ tar -C ~/opt/android -xf ~/Downloads/flutter_linux_v1.0.0-stable.tar.xz flutter
$ ln -s ~/opt/android/flutter/bin/flutter ~/bin/
$ flutter doctor
$ sudo dnf install libstdc++.i686

I am a bit puzzled and hesitant to accept licenses that flutter doctor --android-licenses says need to be accepted.

4 of 5 SDK package licenses not accepted

They are:
  • 1/4: License android-googletv-license
  • 2/4: License android-sdk-preview-license
  • 3/4: License google-gdk-license
  • 4/4: License mips-android-sysimage-license
I guess I'll need to surrender :-(

Now on Android Studio, install the Dart and Flutter plugins.

Let the Android hacking begin!

No comments: