Google released the stable version of Android Studio in December, 8 2014. It is an official and powerful tool to develop Android application. In this Android tip, I am going to show you how to
create a new Project in Android Studio and how to
run it using a real device.
To create a new Android project, from the menu, you select File. Then select New Project... You will be prompted to enter application name, company domain, and path to store the project.
The next screen allows you select platforms and minimum SDK that your application will run on.
By clicking Next, you will be able to add an Activity to the project. Android Studio provides different options for you. You can choose a blank Activity, a blank Activity with Fragment, Google Map Activity, etc. Now you just select a blank Activity.
Click Next to continue. Then you enter the name of the Activity, the name of layout file for the Activity, the title of the Activity, and the name of menu resource used in the Activity.
Finally click the Finish button to create the project.
In the left side, you will see a hierarchy tree. The manifest node of the tree contains AndroidManifest.xml file that has essential information about your application. The java node contains java source files in the application. The res node contains fours child notes: drawable, layout, menu, and values. The drawable node contains drawable resources such as images, and shapes defined in xml format. The menu node contains menu xml files. The values node contains xml files that define the default screen margins, string values, and styles to be used in your application.
You can run the application using an emulator or a real device. Personally, I like running my applications on real devices because it is faster than the emulator.
Before running the application on the real device, you need to make sure that your device is able to communicate with your pc. Currently, I use Samsung Kies software for the communication. You also make sure that the USB debugging of your device is turned on. Then you tell the Android Studio to run the application on the real device. To do so, from the menu, you select Run. Then select Edit Configurationâ�¦ In the Run/Debug Configurations window, make sure you select USB device option before clicking OK.
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: