You are here Home » Tech » How to Setup An Android App Build Environment with Eclipse, Android SDK, and PhoneGap in Fedora

How to Setup An Android App Build Environment with Eclipse, Android SDK, and PhoneGap in Fedora

by Fahad Saleem
fedora android build environment

How to Setup An Android App Build Environment with Eclipse, Android SDK, and PhoneGap in Fedora

Building development environment for Android apps on the Fedora 14 desktop is made quite easy with the help of tools like Eclipse, Android SDK, and PhoneGap. This article describes how to build Android apps from the command line with the help of PhoneGap. We will also see this process on GUI with the help of Eclipse and PhoneGap. These apps can be tested on Android emulator as well as the real Android device. PhoneGap allows you to develop apps using web technologies such as HTML, CSS, and JavaScript. It will transform these apps into native Android apps.

How to Install Eclispe and Prerequisites for the Android SDK/PhoneGap

  • Launch a terminal from Applications ->System Tools->Terminal.

fedora android build environment, android sdk

  • Become root as follows.

su”.

  • Eclipse and the prerequisites for the Android SDK and PhoneGap can be easily installed as follows.

“yum install java-1.6.0-openjdk-devel java-1.6.0-openjdk eclipse eclipse-gef eclipse-gef-sdk ruby rubygems rubygem-nokogiri ruby-devel git ant libxml2 libxml2-devel libxslt-devel wget”

  • Leave the root account now.

exit”.

How to Install Android SDK

  • Go to the official site of Android developers. There you will find different links for Android SDK for platforms like Windows, Linux, and Mac OS X. Copy the link location for the Linux.

fedora android build environment, android sdk

  • Now download and uncompress it as follows.

cd ~
wget http://dl.google.com/android/android-sdk_r08-linux_86.tgz
tar xvfz android-sdk_r08-linux_86.tgz

  • This will result in the directory “android-sdklinux-x86” in your home directory. We must add the tools directory and platforms tools directory to our PATH as follows.
  • Open ~/.bash_profile.

gedit ~/.bash_profile”

  • Replace the “PATH=$PATH:$HOME/bin” line with “PATH=$PATH:$HOME/bin:$HOME/android-sdk-linux_86/tools:$HOME/android-sdk-linux_86/platform-tools”.
  • For making the change effective, use the following command.

export PATH=$PATH:$HOME/bin:$HOME/android-sdk-linux_86/tools:$HOME/android-sdk-linux_86/platform-tools”

  • Now launch the Android SDK as follows.

“Android”.

  • The Android SDK appears as follows.

fedora android build environment, android sdk

  • Choose “Available Packages” in the left panel and then select “Android Repository” in the right panel for downloading the SDK packages.

fedora android build environment, android sdk

  • The packages that are related to the Android repository group, should be selected. Click on the Install Selected button.

fedora android build environment, android sdk

  • You will see a new window. Check the Accept Radio box and then click on Install.

fedora android build environment 7

  • If you need to restart ADB (Android Debug Bridge), click on Yes.

fedora android build environment, android sdk

  • Click on the Close button once the download is finished.

fedora android build environment, android sdk

This completes the process of downloading and installing the Android SDK with Eclipse and PhoneGap. Now you are ready to develop apps and then test on your Android sets or Android emulators.

You may also like