Lesson iv – Android Studio: Introduction, Features, How to install,
Android App Development resides in an environment known as the Android Studio (SDK). Of course, The first step in Android App Development is to equip yourself with the right tools. It could be interfaced directly but, fortunately, an efficient, intuitive and multi-platform work environment was created that takes the name of Android Studio.
With this, we will be able to use all the features of the SDK without any difficulty, as well as work on the code, create user interfaces and test the applications. In this lesson, we will know them both and learn how to install them.
Introduction to Android Studio
Although the first generation of Android App developers was formed on Eclipse, the birth of Android Studio and its reached maturity have been greeted with joy by the experts. In fact, this environment – obtainable from the official website of Android – has come to the world under the banner of flexibility and practicality. First of all, it is the son of IntelliJ, a very intuitive and efficient IDE produced by the JetBrains company. Secondly, Android Studio originated from Google itself and was born specifically for Android, integrating with its entire ecosystem. It allows us to develop projects for smartphones and tablets, as well as for wearable devices, Android Auto and Android TV. The Mountain View giant has a universe of cloud services available.
At the beginning of each new project, the IDE offers different templates that represent the most popular types of applications and the configuration is entrusted to the Gradle build files. The latter is a build automation tool that allows a very flexible configuration with a syntax borrowed from the Groovy language. A very useful contribution that Gradle offers is the management of dependencies in the Maven style. When we need to integrate development libraries produced by Android or third-party developers we will be able to insert directives that will allow us to retrieve them directly on the network using “coordinates” consisting of group id, artifact id, and version.
Other Features of Android Studio.
Below are other Characteristics/features of Android Studio.
- Editor for visual layout usable in drag and drop mode;
- Gradle build systems.
- AVD ( Android Virtual Device) Manager for emulator management;
- Inline debugging, a feature that makes it easier to inspect the code during debugging, adding the values and references linked to the objects to the Java language lines;
- Dynamic layout preview – You can view changes in real-time while editing your code. Ability to instantly change the device to see how it looks on different phones and positions (Landscape and portrait mode).
- Instant Run – Used to deploy and view changes to our app instantly without having to compile and run the code all the time.
- Monitoring of memory and CPU resources used by the app, to follow the dynamic allocation of objects and perform heap memory dumps, to be analyzed later.
An important aspect is that the project is still in continuous expansion. For example, from version 1.3, there has been a reunion between SDK (for development in Java) and NDK (the Native Development Kit, designed for C / C ++ developers) for which editing and debugging has been added in Android Studio.
In the second major release, instead, the aim was to increase productivity and reduce development time with the birth of Instant Run which aims to see changes made to the code in great speed without waiting for long rebuilds of the project and to the enhancement of the emulators that often – especially on less equipped machines – were the sore point of the programmers’ working days.
Topic: Lesson 2 – Android Studio: How to install, Features, Introduction
However, consider that to achieve optimal operation, Android Studio requires that the machine meets certain hardware and software requirements. They are in fact requested:
- Sufficiently modern operating systems (for Windows at least version 7, for Mac minimum OS X 10.10 Yosemite, for Linux we recommend a graphical environment KDE or GNOME);
- Not less than 4 GB of RAM, possibly 8;
- At least 2 GB of free disk space but 4 are recommended.
How to Install Android Studio (SDK)
Before starting with the development of Android applications, it is necessary to configure the IDE to be used for this purpose. This aspect involves a number of steps including the installation of the Java Development Kit (JDK) and the Android Studio development environment, which in turn includes the Android Software Development Kit (SDK).
The Software Development Kit (or, more briefly, SDK ) was developed using the Java programming language and Android applications are also developed using this language. So the first component to install on our system is the Java Development Kit (or JDK ).
So let’s download the JDK from the Oracle site to this page.
Obviously, we download the latest version compatible with our operating system. Once the download is complete we start the executable file and follow the simple installation instructions:
Once the JDK installation is complete, the next step is to download the IDE Android Studio available on this page.
We start the download and once finished we click on the corresponding executable file:
During the installation the classic screens appear which, among other things, allow us to set the installation path of Android Studio and its SDK:
We leave the default options for all the other items and continue until the end of the installation.
When you start Android Studio for the first time, a dialog box appears showing the options to import the settings from a previous version of Android Studio. So, if you have settings to import, select the appropriate options, otherwise indicate that you do not want to import any settings and proceed by clicking the OK button.
After a few seconds of loading (and in some cases additional downloads), the Android Studio welcome window appears.
The last step in the installation phase of the development environment is to be sure that all the necessary Android packages are installed on our system. Android Studio will automatically prompt for the installation of all the required Packages, if not, You can manually install these packages by simply clicking on the Configure (Bottom Right) item in the welcome window and then select the SDK Manager option.
Inside the SDK Manager make sure the following packages are installed.
- Android SDK Tools
- Android SDK Platform-tools
- Android SDK Build-tools
- Android Emulator
- Google USB Driver (Required on Windows systems only)
- Intel x86 Emulator Accelerator (HAXM installer)
Topic: Lesson 2 – Android Studio: How to install, Features, Introduction
If some of these are not installed, just check the checkbox to the left of the package and click on the Install packages button. After accepting the license conditions the installation of the selected packages will start.
Obviously, as we will see, it is possible to install the packages also at a later stage, so for the moment, I advise you not to install them all but only those of the latest versions.
We are sorry that this lesson was not useful for you!
Let us improve this lesson!
Tell us how we can improve this lesson?