Home > Google > The first Android application in IntelliJ

The first Android application in IntelliJ

Google Android Developer

Yesterday I bloged about Android 1.5 SDK installation on my Ubuntu 9.04. Today after my daily duties I found time to continue and create my the first Android App. Here it is. I did nothing special because I’m still a beginner but maybe it’s interesting.

I used ‘Hello world tutorial’ provided by Google. Issue is there is no notes about IntelliJ and advantage is similarity to Eclipse. Before start you have to create your AVD file  ( Andriod Virtual Device) which is simple. When you have mapped SDK correctly our command is navigated to SDK folder tools/.  Only execute following

android create avd --target 2 --name my_avd

Press  ‘Return’ to skip the question (“no” is the right). After I move back to my IDE and start New Andriod Project via main menu

Start new Android project

I had to assign appropriate Android SDK 1.5 folder. After Android Build Target was changed to Android 1.5.

Application name: Hello Android
Package name: com.example.helloandroid
Activit name: HelloAndroid

What is Activity here:
This is the name for the class stub that will be generated by the plugin. This will be 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.

My Android project was ready. I had opened my HelloAndroid.java inside my IntelliJ and I started to editing it. After the source looks like this:

package com.example.helloandroid;

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

public class HelloAndroid extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        TextView tv = new TextView(this);
        tv.setText("Welcome to Android world! by mirage");

Time to start my project (Run->Run -> Select our AVD file for deployment – > Press Run button ).  Then I was very nicely surprised by design of the emulator. (process running on  the background is named ’emulator’) . It looks nicely but be aware you can confirm to providing statistics data to Mr. Google .


After while ( depends on your system ) our application gonna be displayed. And this it’s the end for todays story.

Android App

Categories: Google
  1. No comments yet.
  1. No trackbacks yet.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: