Setting up Android SDK/ADT Bundle on Fedora

Setting up Android SDK/ADT Bundle on Fedora

This guide shows a step-by-step method on how to quickly and easily get started with Android Application development by installing and configuring the android development toolkit (ADT) bundle on Fedora 20.

I have tested this method on Fedora 20. It may be similar for the following Linux distros as well

  • Fedora 16 and above
  • CentOS 6 and above
  • Red Hat (RHEL) 6 and above

Download the ADT bundle

Method 1

Download the ADT bundle according to your architecture from
http://developer.android.com/sdk/index.html.

Method 2

Download using wget by typing the following command

1

2

3

4

5

## 32-bit ##

wget -c http://dl.google.com/android/adt/22.6.2/adt-bundle-linux-x86-20140321.zip

 

## 64-bit ##

wget -c http://dl.google.com/android/adt/22.6.2/adt-bundle-linux-x86_64-20140321.zip

Setting up Oracle JDK

Most of the android stuffs do not work properly with Openjdk Java and it is advisable to use the Oracle/Sun JDK.
Here is a guide to install Oracle/Sun Java JDK

Setting up ADT bundle

You can extract the downloaded file anywhere you want. I have kept my ADT bundle at "/Android Dev”. You can extract there by typing the following in the terminal.

NOTE : Change "defoliate” in the last statement with your username.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

## 32-bit ##

sudo mkdir /"Android Dev"

sudo cp adt-bundle-linux-x86-20140321.zip /"Android Dev"

cd /"Android Dev"

sudo unzip adt-bundle-linux-x86-20140321.zip

sudo rm adt-bundle-linux-x86-20140321.zip

sudo chown -R defoliate:users /"Android Dev"

 

## 64-bit ##

sudo mkdir /"Android Dev"

sudo cp adt-bundle-linux-x86_64-20140321.zip /"Android Dev"

cd /"Android Dev"

sudo unzip adt-bundle-linux-x86_64-20140321.zip

sudo rm adt-bundle-linux-x86_64-20140321.zip

sudo chown -R defoliate:users /"Android Dev"

If you have 64-bit systems and you installed the 64-bit version of the ADT Bundle, you will need to install some 32-bit packages as well, because Android SDK is 32-bit .
For installing these 32-bit packages, enter the following in terminal

1

2

## Only for 64-bit systems ##

sudo yum install glibc.i686 glibc-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686

Launching ADT Eclipse Bundle from Terminal

Make a symbolic link to adt eclipse so as to distinguish it from normal eclipse. Also we can make a symbolic link to the sdk manager for easy use.

1

2

3

4

5

## ADT Eclipse ##

sudo ln -s /"Android Dev"/adt-bundle-linux*/eclipse/eclipse /"Android Dev"/adt-bundle-linux*/eclipse/adt

 

## SDK Manager ##

sudo ln -s /"Android Dev"/adt-bundle-linux*/sdk/tools/android /"Android Dev"/adt-bundle-linux*/sdk/tools/sdk

Now we need to add Android SDK and ADT Eclipse into PATH environment variable. For this we need to edit the ~/.bashrc file. For editing that file, enter the following into the terminal.

1

sudo gedit ~/.bashrc

Add the following lines into that file

1

2

PATH=$PATH:/"Android Dev"/sdk:/"Android Dev"/sdk/tools:/"Android Dev"/sdk/platform-tools:/"Android Dev"/eclipse

export PATH

Now load the new settings using the following command

1

source ~/.bashrc

For running the sdk manager or the adt eclipse you can type the following into terminal now.

1

2

3

4

5

## SDK-Manager ##

sdk

 

## ADT Eclipse ##

adt

 

Last modified: Wednesday, 15 July 2015, 3:28 PM