Wednesday 20 June 2012

Hello World

Hello World

Here i Explain how to create a new project.

Here is a description of each field:

Project Name
This is the Eclipse project name — the name of the directory that contains the project files.
Build Target
This is the version of the Android SDK that you're using to build your application. For example, if you choose Android 2.1, your application will be compiled against the Android 2.1 platform library. The target you choose here does not have to match the target you chose for your AVD; however, the target must be equal to or lower than the target you chose for your AVD. Android applications are forward-compatible, which means an application will run on the platform against which it is built as well as all platforms that are released in the future. For example, an application that is built against the 2.1 platform library will run normally on an AVD or device that is running the 2.3.3. The reverse is not true.
Application Name
This is the human-readable title for your application — the name that appears on the Android device.
Package Name
This is the package namespace (following the same rules as for packages in the Java programming language) that you want all your source code to reside under. This also sets the package name under which the stub Activity is generated.
Your package name must be unique across all packages installed on the Android system; for this reason, it's important to use a standard domain-style package for your applications. The example above uses the "com.example" namespace, which is a namespace reserved for example documentation — when you develop your own applications, you should use a namespace that's appropriate to your organization or entity.
Create Activity
This is the name for the class stub that is generated by the plugin. This is a subclass of Android's Activity class. An Activity is simply a class that can run and do work. It can create a UI if it chooses, but it doesn't need to. As the checkbox suggests, this is optional, but an Activity is almost always used as the basis for an application.
Min SDK Version
This value specifies the minimum API Level on which your application will run. The Min SDK Version should be the same as the Build Target you chose. For example, if theBuild Target is Android 2.1, then the Min SDK Version should be 7 or lower (it can never be higher than 7). For more information, see Android API Levels.
Other fields: The checkbox for "Use default location" allows you to change the location on disk where the project's files are generated and stored.



Choose the Target,and Click Next >


Set application name, package name, Activity and choose minimum SDK.



src > includes the java files.

gen> includes the R.java file.

R.java generates the resources,drawables..
That is automatically generates,after you includes resources in the project.

The defined constants cover the following resource types
anim
array
attr
color
dimen
drawable
id
layout
plurals
raw
sting
style
styleable
xml


Android 2.2 > library of android 2.2

assets > Adding fonts and HTML files.
            the assets directory can be used to store any kind of data. You access this data via the AssetsManager which you can access the getAssets() method.

bin > Includes the apk file you are running project.

res > res folder includes drawables, layouts, values, menus.

Manifest > manifest is information about a project,version code,version number , what permission you added, and activity informations.


This is a structure of android project.






To run the Project,

It will be run in emulator, as this below picture.





No comments:

Post a Comment