Setup Android Studio & Android Virtual Device in Fedora

This post will be regarding setting up Android Studio in Fedora and adding Android Virtual Device.

Download Android Studio from link [1], and extract at the desired location. Run the android-studio/bin/studio.sh file. First time it will ask to install android sdk, so continue with it.

Create desktop entry / launcher:

  • To create a desktop entry, in android studio go to Tools -> Create Desktop Entry.
  • To create command line launcher, in android studio go to Tools -> Create Command-line Launcher.

Setup Android Virtual Device (AVD):
An android app can be tested either in Android Virtual Device, or in the phone itself. Following are the steps to setup Android Virtual Device:

  • In android studio, go to Tools -> Android -> AVD Manager.
  • Select Create Virtual Device.
  • By default, phone category and a phone say Nexus 5X will be selected. Change as per desired or proceed with default.
  • Next it will ask to select a system image, depending on the release name, api level and target api. Click on Download as per desired option. Note you can go back to select different phone, to get more or less options for system image.
  • It will download and install the selected component in the Android Sdk.
  • Verify and save the AVD configuration.

Troubleshooting:
Error: “WARN – vdmanager.AvdManagerConnection – Failed to create sdcard in the AVD folder.” If you get above error while creating android virtual device, it means you need sdcard utility.

For Fedora following are the dependencies:
32-bit Android SDK requires:

sudo dnf install glibc.i686 zlib.i686 libstdc++.i686 ncurses-libs.i686

64-bit Android SDK requires:

sudo dnf install glibc zlib zlib.i686 libstdc++ ncurses-libs mesa-libGL-devel adb libgcc.i686

References:

  1. https://developer.android.com/studio/index.html
  2. https://stackoverflow.com/questions/17993584/failed-to-create-sdcard-in-the-avd-folder-in-linux-fedora

Leave a comment