Setting up your Android development environment

From Noisebridge
(Difference between revisions)
Jump to: navigation, search
(Download/Install Android SDK)
(Add it to Eclipse)
 
Line 14: Line 14:
  
 
== Add it to Eclipse ==
 
== 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.
+
In Eclipse go to File->Import, click on Existing Projects into Workspace and navigate to ''parent directory of'' the Clutter directory.  Check the box that appears for the project and click Finish.
  
 
== Set up a Virtual Device ==
 
== Set up a Virtual Device ==

Latest revision as of 16:01, 30 August 2010

Contents

[edit] 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.

[edit] 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. You'll probably get an error message about not finding the SDK. Just hit OK. For SDK location just browse to the directory where you saved the SDK from before.

[edit] 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'.

[edit] Add it to Eclipse

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

[edit] 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.

[edit] 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.

Personal tools