Quick start developing for Android using SDK

  1. Download Android SDK from http://developer.android.com/ (.180MB file)

  2. Extract to c:\android

  3. Download Eclipse IDE for Java EE dev from http://www.eclipse.org/downloads/ (.180MB file)

  4. Extract to c:\eclipse

  5. Start – Run – type: cmd

  6. Type –> Cd \ - CD android – CD tools

  7. Type –> android create avd –target 2 –name my_avd

  8. Hit enter

  9. Right click My computer - properties - advanced - Environment Variables - Under System Variables add ;c:\android\tools

  10. OK / OK

  11. Run c:\eclipse\eclipse.exe

  12. Click OK

  13. Click Help

  14. Click Install new software

  15. Add

  16. Name = Android

  17. Location = https://dl-ssl.google.com/android/eclipse/

.18. OK

  1. Wait for it to finish “Pending”

  2. Click Developer Tools

  3. Click Next

  4. Click Next

  5. Read the T&C’s

  6. Click I accept

  7. Click Finish

  8. Click yes to Restart Eclipse

  9. Click OK

  10. Click Windows - Preferences

  11. Click android

  12. Click browse

  13. Browse to c:\android

  14. Click Apply/OK

  15. Click File/New/Project/Android/Android project

  16. Package Name: hello

  17. Select Android 1.1

  18. Applicationame = helloworld

  19. PackageName = hello.world

  20. Create Activity = hello

  21. Min SDK Version: 2

  22. Expand out Hello > src > Hello.World > Hello.Java

  23. Paste over the current code visible in the centre of the screen:

package Hello.World;

import android.app.Activity;

import android.os.Bundle;

import android.widget.TextView;

public class hello extends Activity {

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

TextView tv = new TextView(this);

tv.setText(“Hello, Android”);

setContentView(tv);

}

}

  1. Click Run / Run / Android Application

  2. Click Yes to save changes

  3. Wait quite a while – Tada…