Running Simple Application Using Android Studio
Welcome to this fun and very important tutorial Running Simple Application Using Android Studio which is contains the basic things every beginners must know after setting up their development environment.
Here we gonna show you what are the checklist you have to take a look after installing the android studio. In this lesson we are using the very latest version of Android Studio 2.2.2. And now you can find the stable version of the android studio in the official web link.
After download and install the application, you may required to choose whether you are install a fresh copy or update the previous One. If you are update with the previous one than you don’t need to install the HAXM and the repositories.
Or else you installing the fresh setup then you might follow the Install Android Studio lesson from this Series.
Ok, now lets jump into this Running Simple Application Using Android Studio lesson. Here we gonna show how to run a simple application using the fresh Android Studio.
Whenever run the application first time you may cause an error, which shows the red color on the R letter.
The above image is the tells the sdk location is not defined or the path is missing. To resolve this issue we can go the following path location where we install the sdk on our machine.
Go to File -> Project Structure . And in this location we can modify the location of the sdk and also the JDK (Java Development Kit). Set the location as in users folder AppData and C:\Users\AndroidHotspot\AppData\Local\Android\sdk .
Here we give the User name as AndroidHotSpot and you can give the user name of your machine. After entering the SDK location, if the android studio finds the correct SDK on that location you mentioned then it rebuilds the Gradle and shows the errors are cleared.
Running Simple Application Using Android Studio is typically an easy thing, but some time the beginners are lacking in the very basic things like Coordinator Layout and theme changing problems.
We can change the basic theme as like we do. Here in the below we change the default theme to something else.
After click the above changing theme button it will shows up the tons of predefined themes and some of them are categorized under various conditions. We can choose among them which suits best to our app.
For this Running Simple Application Using Android Studio lesson we are not gonna change any theme here. But in the future lessons we may wanted to change the themes obviously. So we will definitely have some fun with the themes.
In this lesson we are gonna tell one more important thing to remember the android studio is we have to test our application before we launch it in the play store. We can have the real devices like the android OS loaded mobiles.
But we can use the inbuilt simulation devices, like mobile tablet and TV etc. For the purpose of our application we can test it in various devices.
Here in Running Simple Application Using Android Studio we show to create an virtual device manager called as AVD(Android Virtual Device). You can find it in the task bar which is next to the menu bar.
After click this AVD Manager then opens a wizard which can creates a new virtual device. In that wizard we can choose the Create Virtual Device. It shows the list of available virtual devices like Phone, TV, Wear, Tablet.
Here we already create some virtual devices to test our applications. But we can also use some third party simulation softwares like Genymotion, Andy and etc.
Here for this Running Simple Application Using Android Studio lesson we are using the default emulator device. For the first time it’ll take a much more time, because the emulator wants to load the Operating System and other third party softwares. Which is looks similar to this,
And here we have our simple Hello World Program. This lesson has some cool text effects like background color, text size and padding and etc. We can learn about these things in the upcoming lessons.
To execute this application in our Emulator just click the Run button or press the combination of Shift + F10 and this will runs the application in our emulator.
You can see here how our simple Hello World application will run in the android studio and the default Emulator.
We hope this lesson will gives you some basic knowledge about how to setup the android environment and Running Simple Application Using Android Studio. We will learn a lot about the android development.