Quick start developing for Android using SDK
-
Download Android SDK from http://developer.android.com/ (.180MB file)
-
Extract to c:\android
-
Download Eclipse IDE for Java EE dev from http://www.eclipse.org/downloads/ (.180MB file)
-
Extract to c:\eclipse
-
Start – Run – type: cmd
-
Type –> Cd \ - CD android – CD tools
-
Type –> android create avd –target 2 –name my_avd
-
Hit enter
-
Right click My computer - properties - advanced - Environment Variables - Under System Variables add ;c:\android\tools
-
OK / OK
-
Run c:\eclipse\eclipse.exe
-
Click OK
-
Click Help
-
Click Install new software
-
Add
-
Name = Android
-
Location = https://dl-ssl.google.com/android/eclipse/
.18. OK
-
Wait for it to finish “Pending”
-
Click Developer Tools
-
Click Next
-
Click Next
-
Read the T&C’s
-
Click I accept
-
Click Finish
-
Click yes to Restart Eclipse
-
Click OK
-
Click Windows - Preferences
-
Click android
-
Click browse
-
Browse to c:\android
-
Click Apply/OK
-
Click File/New/Project/Android/Android project
-
Package Name: hello
-
Select Android 1.1
-
Applicationame = helloworld
-
PackageName = hello.world
-
Create Activity = hello
-
Min SDK Version: 2
-
Expand out Hello > src > Hello.World > Hello.Java
-
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);
}
}
-
Click Run / Run / Android Application
-
Click Yes to save changes
-
Wait quite a while – Tada…