Sample Android App

In the previous post we installed android studio and now lets’s loook how to create a sample project and running it successfully.

The following are the simple steps :

Step 1:
File>New>New Project.

You”ll be prompted with a window something like the following where you can choose your application name and package name and project location. 

NewProject

You can edit your application name and package name.

Step 2:

Now you”ll be prompted  to select minimum sdk that your supports. The minimum sdk is on which version of android is minimum to your app.
For Example :
Let’s say you have selected API 10 i.e., Android 2.3.3 . Your app will not be run on lower versions other than Android 2.3.3.

NewProject.png

Step 3: 

Next step is to add MainActivity (Entry point of your app)which is going to be starting screen of your app.

NewProject.png

You can choose any one of them as per your requirement in my case i”ll be choosing “Empty Activity“.

Step 4:

On the next screen you”ll asked to provide the “First Screen Name“. Be default it will be ‘MainActivity‘. As per java naming conventions you don’t have to give spaces between in your class name.And you”ll be asked to give a ‘layoutname‘. A layout is nothing but xml file which holds your  UI widgets like Buttons,TextViews,EditTexts. We’ll be discussing about widgets in coming up posts.Click on Finish 😛.

NewProject.png

A small info will be displayed saying that gradle is building your app. We will disscuss about it later on.

Now you’re ready to write code. Happy Coding !

Advertisements

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 )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s