Setting up your Android development environment

From Noisebridge
Revision as of 15:52, 30 August 2010 by Lobati (talk | contribs) (Created page with '== Download/Install Eclipse and Git == Preferable 'Eclipse IDE for Java Developers'. For Git, Windows users can download 'msysgit' and Mac users the 'git-osx-installer'. Linux u…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Download/Install Eclipse and Git

Preferable 'Eclipse IDE for Java Developers'. For Git, Windows users can download 'msysgit' and Mac users the 'git-osx-installer'. Linux users just type 'sudo apt-get install eclipse git' at the command line.

Download/Install Android SDK

from here: http://developer.android.com/sdk/index.html. Extract it wherever. Inside Eclipse go to Help->Install New Software and past this link in the box and hit enter:

 https://dl-ssl.google.com/android/eclipse/

Install everything and accept EULA's. Next find your way to the Preferences and click on Android. For SDK location just browse to the directory where you saved the SDK from before.

Clone the repository

From the command line go where you want to store the project (probably inside your workspace directory for Eclipse) and type 'git clone git://github.com/egonSchiele/Clutter.git'.

Add it to Eclipse

In Eclipse go to File->Import, click on Existing Projects into Workspace and navigate to the Clutter directory. Check the box that appears for the project and click Finish.

Set up a Virtual Device

If you don't have an Android phone you'll need to set up a virtual device to test your software on. Go to Window->Android SDK and AVD manager, select New and set your target at 2.2. All the other settings should be fine. Now when you click Run on the project in Eclipse you can run it on an Emulator. If you do have a phone you can enable USB debugging in the settings and then just plug your phone into your computer. When you click Run you will be able to select your phone to install it on and it will appear in your applications menu.

Errors

A couple of people were running into issues when we got to this point. One involved squiggly red lines under the lines in the code. Just hover over it and click on the first solution to fix this. If you're getting an error regarding the build target being wrong you'll need to go back into the Android SDK and AVD manager, click on Available Packages and make sure you install the API level 8. This should fix the problem.