Android Development Tutorial-Developing In Eclipse, with ADT

Jul 21, 2010

Android Development Tutorial- Developing In Eclipse, with ADT

The Android Development Tools (ADT) plugin for Eclipse adds powerful extensions to the Eclipse integrated development environment. It allows you to create and debug Android applications easier and faster. If you use Eclipse, the ADT plugin gives you an incredible boost in developing Android applications:

  • It gives you access to other Android development tools from inside the Eclipse IDE. For example, ADT lets you access the many capabilities of the DDMS tool: take screenshots, manage port-forwarding, set breakpoints, and view thread and process information directly from Eclipse.
  • It provides a New Project Wizard, which helps you quickly create and set up all of the basic files you’ll need for a new Android application.
  • It automates and simplifies the process of building your Android application.
  • It provides an Android code editor that helps you write valid XML for your Android manifest and resource files.
  • It will even export your project into a signed APK, which can be distributed to users.

To begin developing Android applications in the Eclipse IDE with ADT, you first need to download the Eclipse IDE and then download and install the ADT plugin. To do so, follow the steps given in Installing the ADT Plugin.

If you are already developing applications using a version of ADT earlier than 0.9, make sure to upgrade to the latest version before continuing. See the guide to Updating Your ADT Plugin.

Note: This guide assumes you are using the latest version of the ADT plugin. While most of the information covered also applies to previous versions, if you are using an older version, you may want to consult this document from the set of documentation included in your SDK package (instead of the online version).

Creating an Android Project

The ADT plugin provides a New Project Wizard that you can use to quickly create a new Android project (or a project from existing code). To create a new project:

  1. Select File > New > Project.
  2. Select Android > Android Project, and click Next.
  3. Select the contents for the project:
    • Enter a Project Name. This will be the name of the folder where your project is created.
    • Under Contents, select Create new project in workspace. Select your project workspace location.
    • Under Target, select an Android target to be used as the project’s Build Target. The Build Target specifies which Android platform you’d like your application built against.Unless you know that you’ll be using new APIs introduced in the latest SDK, you should select a target with the lowest platform version possible.Note: You can change your the Build Target for your project at any time: Right-click the project in the Package Explorer, select Properties, select Android and then check the desired Project Target.
    • Under Properties, fill in all necessary fields.
      • Enter an Application name. This is the human-readable title for your application — the name that will appear on the Android device.
      • Enter a Package name. This is the package namespace (following the same rules as for packages in the Java programming language) where all your source code will reside.
      • Select Create Activity (optional, of course, but common) and enter a name for your main Activity class.
      • Enter a Min SDK Version. This is an integer that indicates the minimum API Level required to properly run your application. Entering this here automatically sets the minSdkVersion attribute in the <uses-sdk> of your Android Manifest file. If you’re unsure of the appropriate API Level to use, copy the API Level listed for the Build Target you selected in the Target tab.
  4. Click Finish.

Tip: You can also start the New Project Wizard from the New icon in the toolbar.

Once you complete the New Project Wizard, ADT creates the following folders and files in your new project:

src/
Includes your stub Activity Java file. All other Java files for your application go here.
<Android Version>/ (e.g., Android 1.1/)
Includes the android.jar file that your application will build against. This is determined by the build target that you have chosen in the New Project Wizard.
gen/
This contains the Java files generated by ADT, such as your R.java file and interfaces created from AIDL files.
assets/
This is empty. You can use it to store raw asset files.
res/
A folder for your application resources, such as drawable files, layout files, string values, etc. See Application Resources.
AndroidManifest.xml
The Android Manifest for your project. See The AndroidManifest.xml File.
default.properties
This file contains project settings, such as the build target. This files is integral to the project, as such, it should be maintained in a Source Revision Control system. It should never be edited manually — to edit project properties, right-click the project folder and select “Properties”.
Android development Tutorial has been taken from developer.android click the link to read the rest of the Android Tutorial
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Share with others

4 Responses so far | Have Your Say!

  1. free tattoo designs
    August 5th, 2010 at 1:49 am #

    I came across your site, i think your blog is awsome, keep working !

  2. busy Holandia Polska
    August 5th, 2010 at 3:13 pm #

    This is the best site, i’ve ever seen, bookmarked

  3. sun tattoo designs
    August 7th, 2010 at 4:46 pm #

    Good work ! Keep us posting, you are very good writer.

  4. sts
    August 8th, 2010 at 1:54 pm #

    Great info, thanks for useful post. I am waiting for more

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

rss
Карта