For this tutorial, I知 going to use Eclipse, because frankly it痴 the easiest and most hassle-free development tool for Android right now.
click here to download Android
If you don稚 have it already, you need to download the Java JDK 1.6 and above version.
click here to download Java Development Kit (JDK)
Next Step, you will need to get the Android SDK Tools straight from Google. Unpack and install this to a directory you値l remember ? you need to reference this in the next few steps.
click here to download Android SDK Tool
After download the Android SDK Tools, you will be unpacked the android SDK. Firstly, you will find a file named 鉄DK Setup.exe.? Start that file .the following dialogue should appear.
For me, however, I only really want to program for Android 2.2, so those are the only API packages I bothered to get (someday I may pay for my folly, but not today). Either way, get what you want (and you do need to pick one) and hit install.
Now that you have finished yet another painful download, click over to 砺irtual devices?. We are going to create an Android device that will test run your programs for you! Hit 哲ew? to create a new Android device, and put in the specifications that you want it to have. Show in the screenshot below.
Note:Click 鼎reate AVD? to殆ell膨reate your AVD.
Next step ,select your AVD from the list, and hit 鉄tart? to make sure that you do indeed have a working emulation of an Android phone.
After a pretty lengthy start-up wait, it should look something like this.
Now, Installing the ADT plugin in eclipse, so start Eclipse and follow these step.
Now , select both of the resulting packages, and hit next.
This will download the Android ADT (Android Development Tools). Go ahead and start the download to obtain these all packages and restart Eclipse (it should prompt you to on completion of the downloads)
This step, we will remember that Android SDK we got earlier? We didn稚 do anything with it. Now, At this time to tell Eclipse where it is so Eclipse can use it as a resource and follow these step:
Now, we are ready to start coding. We discuss the some step to create a new project.
After the click finish button. Show next step in below picture.
In the tree on the left, show many folder like src, gen, res etc.
package r4r.co.in;
import android.app.Activity;
import android.os.Bundle;
public class WelcomeActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
/* AUTO-GENERATED FILE. DO NOT MODIFY.
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand. */
package r4r.co.in;
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int icon=0x7f020000;
}
public static final class layout {
public static final int main=0x7f030000;
}
public static final class string {
public static final int app_name=0x7f040001;
public static final int hello=0x7f040000;
}
}
?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http: //schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout>
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Welcome, This is R4R Tutorial!</string> <string name="app_name">Welcome</string> </resources>
This is finally step, when your application is complete then you want to execute the application. Now, Above your code, you値l see a little green 撤lay? button (or navigate to 然un>Run?) or second method, select the application and click the right button and click the runas icon and select the "AndroidApplication" and click it.It will prompt you to save changes; hit yes.
Now you get to wait an eternity while your virtual device boots up.After everything痴 done loading, your application should upload and start automatically. Which means that right after you 砥nlock? the device, you willll be greeted with your first Android program.I only captured the top half of the screen because the rest of it is black.
(追記) (追記ここまで)Others
Languages
Frameworks
Web / Design
Mobile Technology
Sql & Technology
R4R