Overview To Android Studio
The trend is changing. People don’t just want to install apps anymore, but also want to feature them on the Play Store and make profits.
Which leads us to the question – how to create Android apps?
Before answering this question, we need to understand technical things like what are IDEs and how many of them are available for Android app development.
IDE stands for Integrated Development Environment, which is a software or application that has all the tools that are required for the application development. They provide us with the platform to develop apps. There are many IDEs in the market. Some of the famous IDEs used for Android app development are Eclipse, IntelliJ IDEA, Android Studio.
Android Studio is the official IDE for Android App Development and it is based on IntelliJ IDEA. Android studio contains all the tools which are required to build an application.It is an Intelligent IDE, which notifies you about updates that are easily installed with a click.
Let’s see what Android Studio looks like.
Let’s understand what each of the numbers in the above image represents:
- The first bar has features like VCS that allows you to push your code into GitHub. Refactor lets you change the name of you application. “VCS” stands for Version Control System. It records changes to a file or set of files over time so that you can recall specific versions later. Suppose you make your application in Android version 6.0. When you are done, you push the code into a cloud like GitHub . When a new version of Android releases, the VCS will record the changes you make to your app for the new version.
- The second toolbar contains all the editor’s tool. It allows you to perform actions like running the application, debugging the code, opening SDK manager, etc.
- This is the navigation bar which helps users navigate throughout the project and open any file for editing at any time.
- This is your project structure. It contains all files – the java file , manifest file, resource folder, layout file and the Gradle. We will talk about them later.
- This is the editor’s window – the place where you write and modify code.
- This is the tool window bar. It borders the studio and contains various tools, which can be expanded or collapsed.
IntelliJ IDEA is also an IDE. To know more about it, click here. Instead of the powerful code Editor(IntelliJ), Android Studio provides more interesting features which can be used to enhance productivity. They are as follows:
- Emulators – to run and test application.
- A platform to develop android application for all android devices.
- It also provide LINT tools so that we can check problems like version compatibility, performance,etc. (LINT is a special tool provided by Android Studio to check your project for different kind of bugs).
- It also supports C++ and NDK. “NDK” stands for Native Development Kit, which consists of a set of tools that allows you to use C and C++ to make native applications.
- You can push your code directly into Github as the studio is integrated with it.
- Various code templates are also given to set the environment and make it easier for user to code.
- Instant Run option to apply changes in the application that you are running without creating new APK.
- And many more…
APK is what you use to feature your app on Google Play Store. You cannot place the whole code inside Play store – some specific format of file needs to be placed, which contains all the information of your application. This file is only .apk file.
“APK” stands for Application Package Kit. It is a package file format, which consist all the information related to your app that is used by Android System for distribution and installation.
These features become more familiar once you work with them.
Some Extra Features In Detail
- Version Control – We know what it is. Let’s see how many there are and how to use them.
To find out how many version control systems there are, just go to VCS->Checkout from Version Control. A list of supported Version Control System will appear as shown below.
To import or push your code into any version control system go to VCS->Import into Version Control and select your appropriate system.
2. Run – This tool is used to run your application in the emulator and test it. You can also run your application in different devices provided by the Android studio.
When you click ‘run’, the above window will appear. It will ask you to choose the device that you want to run the app on.\
3. Debug – If you want to debug or check your code closely then choose this option. All you need to do is apply breakpoints in the program to perform debugging.
Breakpoint can be applied simply by clicking on the space near number as shown in the figure. Through debugging we can see at which point what value is assigned to the variable.
4. Logcat : It can be found in the bottom toolbar. It is used to check the flow of an application.
The Logcat window is as follows:
The Log class allows you to write log messages that must appear in the Logcat of the Android Studio. Below is a list of the types of messages that you can write in your code. These are arranged in descending order of their priorities : –
|Error||Used to print error messages|
|Warning||Used to print warning messages|
|Info||Used to print information related messages|
|Debug||Used to print debug messages|
|Verbose||Used to print all messages|
Used in testing purpose and print that messages that are unexpected.
Lastly, below are a few shortcuts to open features.