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 :
You”ll be prompted with a window something like the following where you can choose your application name and package name and project location.
You can edit your application name and package name.
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.
Next step is to add MainActivity (Entry point of your app)which is going to be starting screen of your app.
You can choose any one of them as per your requirement in my case i”ll be choosing “Empty Activity“.
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 😛.
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 !