Version from 12/11/2012

Let’s begin with a Project Name - it is the name of the project that will be displayed in the list of projects on the left. As we will have many projects, I propose to think up a prefix for names. It would be easier to return to older projects and they will be structured nicely and conveniently.

The prefix can be like this: P<lesson number(000)><lesson project number(0)>. We will leave three numbers for the lesson number and one for the project number. Let’s add some logical name to the prefix (OurFirstProject) and we will get the name of our first project of the third lesson - P0031_OurFirstProject.

Application name - it’s directly the name of the application, which will be displayed in the device application list. We can specify the project name without a prefix.

Package name - Java term, explained in details here. Shortly, it is a prefix for classes names of our application. I will be using ru.startandroid.develop.<application name>

Minimum Required SDK defines the minimum Android Version within which the application will launch. Let’s choose the same as while creating AVD - 2.3.3.

Compile With defines the abilities of which Android version will the application use. Specify 2.3.3 here.

Target SDK defines the maximum Android version, on which you have tested your application. It’s required for compatibility modes. Specify also 2.3.3 here.

Do not specify a Theme for now, choose None

Click Next

From ticks leave only

Create Activity - immediately after the project creation the Activity will be created, not to create it manually.

Create Project in Workspace. Project will be created and saved in the default workspace.

Click Next

Choose BlankActivity

Click Next

Make sure here, that in field Activity NameMainActivity is specified, and in field Layout Name enter main. Navigation Type - None.

Click Finish.

The project has been created.

07/10/2012 Variant

Let’s begin with a Project Name - it is the name of the project that will be displayed in the list of projects on the left. As we will have many projects, I propose to think up a prefix for names. It would be easier to return to older projects and they will be structured nicely and conveniently.

The prefix can be like this: P<lesson number(000)><lesson project number(0)>. We will leave three numbers for the lesson number and one for the project number. Let’s add some logical name to the prefix (OurFirstProject) and we will get the name of our first project of the third lesson - P0031_OurFirstProject.

Application name - it’s directly the name of the application, which will be displayed in the device application list. We can specify the project name without a prefix.

Package name - Java term, explained in details here. Shortly, it is a prefix for classes names of our application. I will be using ru.startandroid.develop.<application name>

Build SDK defines the abilities of which Android version will the application use. Let’s choose the same as while creating AVD - 2.3.3.

Minimum Required SDK defines the minimum Android Version within which the application will launch. Let’s make it the same as Build SDK - 2.3.3.

From ticks leave only Create Project in Workspace. The project will be created in the default workspace.

Click Next

The window for Activity creation opens.

Choose BlankActivity here and click Next.

Make sure here, that in field Activity NameMainActivity is specified, and in field Layout Name enter main. Do not touch other fields.

Old variant

The window for creating a project appears. In newer versions this window is splitted into three.

Let’s fill it in.

Let’s begin with a Project Name - it is the name of the project that will be displayed in the list of projects on the left. As we will have many projects, I propose to think up a prefix for names. It would be easier to return to older projects and they will be structured nicely and conveniently.

The prefix can be like this: P<lesson number(000)><lesson project number(0)>. We will leave three numbers for the lesson number and one for the project number. Let’s add some logical name to the prefix (OurFirstProject) and we will get the name of our first project of the third lesson - P0031_OurFirstProject.

Build Target defines the abilities of which Android version will the application use. Let’s choose the same as while creating AVD - 2.3.3.

Application name - it’s directly the name of the application, which will be displayed in the device application list. We can specify the project name without a prefix.

Package name - Java term, explained in details here. Shortly, it is a prefix for classes names of our application. I will be using ru.startandroid.develop.<application name>

On the left our project appeared, let’s expand the project. We will look through the most important and frequently used folders and files.

src - all our written source code will be situated in this folder

gen - filed generated by the environment that the application requires. You better not touch anything here. (If there is no such folder - edit something in the project and click Save button).

Android 2.3.3 - Android libraries required for the application

assets and res - folders for resource files of different type

AndroidManifest.xml - manifest or configuration file of the application

We will use all this later and it will be clear what it’s needed for.

Select the project name on the left.

and let’s run it - press CTRL + 11,

then choose Android Application

click OK.

The emulator will be launched, I advise not to touch or press anything, because it’s laggy and unstable thing. Startup time is approximately one minute. Wait until the following strings appear in Eclipse console.

The application is installed on the emulator and is running. Unlock the emulator screen (if it is locked) and observe our application.

You can see the name of the application and the name of the Activity. We have just created and launched our first application.

If you didn’t manage to launch it and there is a message like this in Eclipse console "emulator-5554 disconnected! Cancelling 'ru.startandroid.develop.OurFirstProject.MainAct activity launch'!" - close the emulator and try again. If you didn’t manage to do it again - restart Eclipse. If failed again - reboot. If it doesn’t work even now - delete the AVD and create a new one. Finally it should work, even if not from the first try.

The main thing here - after running the application (CTRL + F11) try to make as few motions as you can on your computer. I have spotted a clear tendency - if you switch different windows while emulator is starting, it launches with faults. But if you sit and wait for a minute - everything would be fine. And turn off all the other procedures like video rendering that load the system.