started learning android development using the ADT plugin #Eclipse

Whoa !!! I have just taken  the first step into the android application development.

Download the Android SDK from the following link:

http://developer.android.com/sdk/index.html

Then install the ADT plugin for eclipse as follows:

  1. Start Eclipse, then select Help > Install New Software….
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter “ADT Plugin” for the Name and the following URL for the Location:
    https://dl-ssl.google.com/android/eclipse/

    Note: If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).

    Click OK.

  4. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  5. In the next window, you’ll see a list of the tools to be downloaded. Click Next.
  6. Read and accept the license agreements, then click Finish.
  7. When the installation completes, restart Eclipse.

Configuring the ADT Plugin

Once you’ve successfully downloaded ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

  1. Select Window > Preferences… to open the Preferences panel (Mac OS X: Eclipse > Preferences).
  2. Select Android from the left panel.
  3. For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory.
  4. Click Apply, then OK.

Now download the Android platform on which we need to develop the applications…

After the download of the platform is done, we can now create an AVD…

1. Select Window > Android SDK and AVD Manager

2. Now select New

3. Enter the name of the AVD of your choice (e.g., my_avd) and just leave the other options as such

4. Click on Create AVD
That’s it🙂 now everything is ready for the development …

After you’ve created an AVD, the next step is to start a new Android project in Eclipse.

  1. From Eclipse, select File > New > Project.If the ADT Plugin for Eclipse has been successfully installed, the resulting dialog should have a folder labeled “Android” which should contain “Android Project”. (After you create one or more Android projects, an entry for “Android XML File” will also be available.)
  2. Select “Android Project” and click Next.
  3. Fill in the project details with the following values:
    • Project name: HelloAndroid
    • Application name: Hello, Android
    • Package name: com.example.helloandroid (or your own private namespace)
    • Create Activity: HelloAndroid
    • Min SDK Version: 2

    Click Finish.

Your Android project is now ready. It should be visible in the Package Explorer on the left. Open the HelloAndroid.java file, located inside HelloAndroid > src > com.example.helloandroid). Edit it like this:

package com.android.helloandroid;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloAndroid 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);
   }
}

Run the Application

The Eclipse plugin makes it very easy to run your applications:

  1. Select Run > Run.
  2. Select “Android Application”.

The Eclipse ADT will automatically create a new run configuration for your project and the Android Emulator will automatically launch. Once the emulator is booted up, your application will appear after a moment.

Configuring the ADT Plugin

Once you’ve successfully downloaded ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

  1. Select Window > Preferences… to open the Preferences panel (Mac OS X: Eclipse > Preferences).
  2. Select Android from the left panel.
  3. For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory.
  4. Click Apply, then OK.

6 thoughts on “started learning android development using the ADT plugin #Eclipse

  1. Hello, I’m starting to get into eclipse development. This is my first time running the program. When I run the app, I get the following message:
    invalid command-line parameter: Garrett\Desktop\android-sdk_r12-windows\android-sdk-windows\tools/emulator-arm.exe.
    Hint: use ‘@foo’ to launch a virtual device named ‘foo’.
    please use -help for more information

    Any ideas?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s