Showing posts with label First. Show all posts
Showing posts with label First. Show all posts

Sunday, December 13, 2009

How to RUN 'Hello Android' Application in Eclipse??

Current post is on how to run 'Hello Android' application in Eclipse


You reached the stage where you want to compile and check you first android application result ??

It's very simple.

1. Go to 'Run' -> 'Run Configurations..'
2. Select 'Android Application' from left panel
3. Select 'New_configurations' from left panel
4. Select 'Android Tab' from right panel and select the workspace
5. Press 'Apply' button
6. Select 'Target Tab' from right panel and select the appropriate emulator
7. Press 'Apply' button
8. Run

Here you go amigo!!!


Appreciate your feedback via comments. Thanks.

Saturday, December 12, 2009

'Hello Android' Application not coming on Emulator screen ??

Current post is on how to get the 'Hello Android' Application on Emulator Screen


You followed all the instructions properly, the code got compiled and the application got deployed on emulator, still you cann't see 'Hello Android' on emulator screen?

Just Relax.

Some times the emulator takes about 2 minutes to load the things.

So first you see 'ANDROID _ '
then you will see 'ANDROID ICON'
and finally your application with 'Hello Android'

So take a deep breath and give some time to emulator to load the application.

Congratulations on your first application on Android.

Thursday, December 10, 2009

'Hello Android' Android Application on Vista

Current post is on how to create your first Android 'Hello Android' Application in Eclipse in Vista


As in previous post, we setup the things, now it's time to get dirty, i mean start development.

1) Create AVD Emulator


Method:

1. Run 'SDK Setup.exe' from ADK_DWLD_PATH.
2. Select 'Virtual Device' Tab.
3. Select 'New...'.
4. Enter 'Android1.1' (Any name of your choice) in 'Name Field'.
5. Select 'Android 1.1 API Level 2' (Any platform of your choice) in 'Target Field'.
6. Keep rest as default. (You can change as per your requirement)
7. Press 'Create'.


2) Create New Project


Method:

1. Start Eclipse.
2. Select 'File' -> 'New' -> 'Project'.
3. Select 'Android Project' under 'Android'.
4. Press 'Next'
5. Enter 'Project Name' as 'Hello Android'
6. The 'Target Name' will shows all the current platform installed. I selected 'Android 1.1' (Emulator is for API 1.1)*
7. 'Application name' -> 'Hello, Android'.
8. 'Package name' -> 'com.example.helloandroid'.
9. 'Create Activity' -> 'HelloAndroid'.
10. 'Min SDK Version' -> 2 (will be automatically set).
11. Press 'Finish'.

3) Edit the content


Project 'Hello Android' will be created.

Replace the content in 'HelloAndroid.java'.

Code::

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);
    }
}

4) Run the Application


Method:

1. Select 'Run' - 'Run'**.
2. Select 'Android Application'***.


Yes. My first application on 'Andriod'.

* - 'Target Name' Empty list Post
** - 'Run Configuration' Post
*** - 'No 'Hello Andriod' ' Post

Appreciate your feedback via comments. Thanks.
Disclaimer:

The above post and all the posts in the blog are derived from facts, information, logical interpretation and logical conclusion of printed and internet materials available to me, perceived and produced by 99 gm brain of mine, which by no means always be accurate, consistent and complete.

All the posts are for personal quick reference only.

If any suggestion, correction, misinterpretation, misconception commented, which will be moderated and deleted if required, to avoid unforeseen issues.

If any trademark / copywrite issue is present, do send in a mail and appropriate tag (logo, name, website link) will be attached to the same.

Additional disclaimer will be attached wherever required in the post.