Installing Eclipse and the Android SDK on Mint/Ubuntu or any derivative of Ubuntu
Note: I’m using LinuxMint 14. These steps are the same for Ubuntu and Kubuntu etc…
The first thing we need to do is download all of the needed files. First up, the Android SDK. You can download it from http://code.google.com/android/download.html
We’re also going to need Eclipse. Head over to http://www.eclipse.org/downloads/package…ers/junor. Select the appropriate one 32-bit or 64-bit.
Next, we’re going to need Java. Bring up a terminal window (Applications -> Accessories -> Terminal). We can install it using apt, by running…
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-jdk
(If you’re using a 64 bit distribution, you’ll also need to install the ia32-libs as well)
sudo apt-get install ia32-libs
Now that Java is installed, we can get started on Eclipse. First, let’s untar/gzip Eclipse. In our terminal window…
And then untar/gzip the file.
tar xvfz eclipse-java-juno-linux-gtk.tar.gz
Finally, move it into your home folder.
mv eclipse ~
Now, if you want to add eclipse to your menu, right click on Applications and Edit Menu. Click on Programming, and then click New Item. Type in the name, and the full location to Eclipse (/home/your-user-name/eclipse/eclipse), and finally, click OK.
Personally, I just made a launcher for it on my Desktop.
Now, let’s extract the Android SDK. Back in the terminal again…
Let’s move the resulting folder into our home folder.
mv android-sdk-linux_x86-1.0_r1/ ~
Now, this is the single most important step. Without this, we’ll encounter all sorts of odd problems later. Open up your ~/.bashrc in your favorite editor (because I’m doing this in Xubuntu, I’m using mousepad. You can use whatever you’d like.)
sudo gedit /etc/bash.bashrc
And we’re going to add the following at the bottom of the file (making sure you replace your-user-name with your actual username.)
Save the changes, and exit your editor. Now, we can start up Eclipse.
Eclipse will prompt you to choose a workspace location.
This is where all of your project files will be stored. Set it where you want, and click OK.
Once Eclipse is started up, we can add the ADT plugin. In the menu, Help -> Software Updates.
Click on the Available Software tab, and then Add Site. For the location, we’re going to enter http://dl-ssl.google.com/android/eclipse/
And click OK. Eclipse will go find the list of available software, and update your list.
Click the checkbox next to the Location we just added to select all of the software, and click Install.
Eclipse will calculate all of the requirements and download the needed files. Then you’ll be greeted by the Install window.
Click Next to install the selected tools. You’ll be asked to agree to the license.
Accept the license agreement, and then click Finish. Eclipse will install everything…
…And then will prompt you to restart, click Yes. Eclipse will restart.
The last thing we need to do is point the ADT plugin to our Android SDK folder. In the top menu, go to Window -> Preferences, and then click on the Android tab.
Click Browse, choose the Android SDK folder, and then click OK. Now click Apply and let Eclipse crunch on it for a second or two.
And click OK. You’re finished!
Run a quick test and make sure everything is working properly, go to File -> New -> Project. Expand Android, click on Android Project, and click Next.
Now we’ll have to fill in our project information. Because this is a test run, we’ll call the project testproject. For the package name, we’ll use com.android.test. And last but not least, the activity name will be test.
Eclipse will crunch on that for a second, and open the project in the left pane. Expand the main tree to see the file structure of a default new project. The last thing we need to do before we run our test application is set up a run configuration. In the menu, go to Run -> Run Configurations…
Double click on Android Application and it will create a new configuration. Give the configuration a name, and click browse for the project.
Choose your project, click OK. Now click Apply, then Run.
You’ll notice the bottom pane switches over to Console. This will let you know what’s going on with the emulator. After a few seconds, the emulator will start up.
Note that the first run will take much longer than usual to start up, as it’s setting up the Android OS while it starts up for the first time. Depending on the specs of your computer, it can take anywhere from a few minutes.
After awhile, you’ll arrive at the starting screen.
I usually just click wait. In the console, you’ll see it install, and then start up your application.
And with that, it’s time for you start making your application.