If you're starting out with Android app development, the first big step is having your own well-prepared work environmentAndroid Studio is Google's official IDE, and while installation isn't complicated, it does have several important details: prerequisites, wizards, SDK, emulators, potential errors, and more. In this article, I'll guide you step-by-step through the entire process so you can get it working perfectly and start programming without any headaches.
Throughout the text you will see how Download Android Studio from the official websiteThis guide will cover installing Java on Windows, macOS, and Linux, configuring the SDK, emulator, and Java, troubleshooting common errors, and taking your first steps by creating projects and testing apps on both emulators and real devices. The goal is that, by the time you finish reading, you'll have your environment perfectly set up and understand what's happening "behind the scenes" at each stage.
What is Android Studio and why is it the official environment?
Android Studio is the Google's official integrated development environment (IDE) for creating Android applications. It replaced Eclipse as the recommended tool years ago, and today it is the de facto standard for virtually every Android developer.
It is built on JetBrains' IntelliJ IDEA and is distributed under the Apache 2.0 licensewhich means it's free and very flexible. You can install it on Windows, macOS, Linux and even ChromeOSAnd in all cases you will have the same basic tools: code editor, visual interface designer, Gradle-based compilation system, official emulator and utilities for debugging, performance analysis and project management.
With Android Studio you can write code primarily in Java or KotlinHowever, thanks to the NDK you can also integrate parts written in C or C++. The IDE includes support for version control, APK analysis, dependency management, and a host of wizards and assistants that simplify common tasks, such as creating activities, configuring the emulator, or generating a new project from scratch.
One of its major advantages over older environments like Eclipse is that, when installing Android Studio, Everything you need to get started is already integrated.The graphical environment, the Android SDK, the build tools, and, if you choose it in the wizard, the emulator and the necessary system images. This saves you from having to download and connect components separately, which used to be quite common.
Android SDK License and Key Legal Terms
Before you can download the SDK and command-line tools, Google makes you accept the Android Software Development Kit License AgreementAlthough most of us tend to click "Accept" almost without thinking, it's worth knowing what it entails in general terms.
In the contract, Google grants you a limited, non-exclusive and non-transferable license to use the SDK solely for developing applications for “compatible implementations” of Android. A compatible implementation is essentially a device that complies with the Compatibility Definition document and successfully passes the official Android Compatibility Test Suite (CTS).
You cannot use this SDK to create tools for other platforms or for unsupported implementations of Android, nor to develop your own alternative SDK using this as a base. It is also specified that the intellectual property rights to the SDK belong at all times to Google or its licensors, and you only receive the right to use it under the terms set.
The agreement makes it very clear that You may not decompile, disassemble, reverse engineer, or create derivative works. of the SDK, except where expressly required by third-party open source legislation. Furthermore, they reserve the right to change the nature of the SDK without prior notice and to discontinue offering it, temporarily or permanently, at any time and in any country.
It also regulates use of Google data APIsIf you use APIs that return information from Google or users, that information may be protected by intellectual property rights, and you can only manipulate and redistribute it within the limits of each API's specific terms. In special cases, such as the Android RecognitionService API, you are bound by specific data processing annexes to comply with the GDPR.
Regarding responsibility, Google makes it very clear that The SDK is offered “as is” and “as available”without warranties of any kind, and limits its liability for direct or indirect damages. An indemnification clause is also included: you agree to defend and hold harmless Google from claims arising from your use of the SDK or the applications you have created with it.
The contract is governed by the laws of the state of California, with jurisdiction in the courts of Santa Clara County, and the SDK is subject to the United States export laws, with the corresponding restrictions on destinations and end users.
Prerequisites: Java JDK and system components
For Android Studio to work correctly you need to have it installed Java Development Kit (JDK)In recent versions, the IDE comes with an integrated JetBrains/Oracle runtime to run Android Studio itself, but to compile certain projects, tools, or older versions, it is still recommended to have a properly configured JDK.
During the Windows installation, it is common for the wizard to... Check if a JDK is installed.If it can't find it, it may display an error message indicating that Java cannot be located and offer a button to visit the Oracle website directly, where you can download the appropriate JDK for your system. On macOS and Linux, you can also install the JDK from the official repositories or from the Oracle or OpenJDK websites.
Once the package is downloaded, the process is simple: on macOS, for example, you just need to Open the installer, press Continue, Install, enter the administrator password and let it finish. On Windows you'll follow the classic .exe wizard with next-next clicks, and on Linux you'll usually use the package manager or a .tar.gz/.deb/.rpm installer depending on the distribution.
To verify that Java is correctly installed, you can open a terminal or command prompt and run the command "Java -version"If everything is working correctly, you will see the installed version, for example, "java version 10.0.1" or the corresponding version. If the command is not recognized, you will need to check the installation or the PATH environment variable.
On some Windows computers, an error may appear indicating that the file is missing. MSVCR100.dll This problem occurs when trying to start Android Studio. It can be resolved by installing the "Microsoft Visual C++ 2010 Redistributable Package", which adds the necessary libraries to the system for the IDE to run.
Download Android Studio and command line tools
The entire download process must always be done from the Android Developers official websiteYou can directly type the address “http://developer.android.com” or “https://developer.android.com” into your browser and, once inside, access the Android Studio section.
In that section you will find, first of all, the download area where a large “Download Android Studio” button appears, adapted to your operating system (for example, “Download Android Studio for Windows” or “for Mac”). Clicking it will display the SDK license terms and conditions, which you must read and accept by checking the corresponding box before the download begins.
Depending on your browser, you'll see the download progress at the top or bottom of the window. The downloaded file will be a .exe on Windows, .dmg on macOS and .zip on LinuxPlease note that this package usually includes not only the IDE, but also the basic SDK and essential components, so the size may be considerable and the download may take a few minutes.
In addition to the complete package, Google offers the Android Command Line ToolsA set of command-line tools for managing SDKs, platforms, virtual devices, and other elements without the need for a graphical interface. To download them, you will also need to expressly accept the SDK license terms, which cover these tools just like the main IDE.
Installing Android Studio on Windows
Once the .exe file is downloaded, the installation on Windows is done through a very simple graphical assistantJust double-click on the installer and follow the steps.
On one of the first screens, it will ask you which components you want to install. It's recommended to make sure the options are selected. “Android SDK” and “Android Virtual Device” If available, install both the SDK and the tools to create and run emulators.
You will also need to choose whether you want to install Android Studio for all users of the team or just for your userIf you choose “Install for anyone using this computer”, the installation will default to “C:\Program Files\Android\android-studio”. If you select “Install just for me”, it will be installed in a user profile path, such as “C:\Users\YourUsername\AppData\Local\Android\android-studio”.
Installing it only for your user has the advantage that You avoid having to run tools with administrator privileges. In many cases, a global installation may require more privileges when updating components.
The assistant will also show you the default Android SDK folder, as well as the recommended memory amounts for developmentGenerally, you can leave the suggested values unless you plan to work on very large projects. Once you confirm the options, the installer will copy the necessary files, and when finished, you'll be able to launch Android Studio for the first time.
Installing Android Studio on macOS
On macOS, the process is even more straightforward. After downloading the .dmg file from the Android Developers website, double-click on it to mount the disk imageA window will open with the Android Studio icon and, usually, a shortcut to the "Applications" folder.
All you have to do is drag the Android Studio icon to the “Applications” folderThe system will copy the program, and once finished, you can open it from Launchpad or Finder, in the Applications section.
The first time you run it, macOS may display a message warning that it's an application downloaded from the internet and asking if you're sure you want to open it. Simply tap on "Open" to continue.
Android Studio will then start a small internal wizard that checks if there is previous configurations that you want to import (For example, if you've already used it in another version). If this is your first installation on that machine, select that you don't want to import "settings" and continue.
During this initial startup, the IDE may download additional components, such as the Android SDK, emulator tools, and auxiliary librariesIt may also request the administrator password to install the Intel HAXM hardware accelerator or other items that require system changes.
Installing Android Studio on Linux
On Linux, the usual download is a file .zip file containing the complete “android-studio” directoryOnce the download is complete, you should extract it to your preferred location, for example, your user folder or /opt, depending on your preferences and permissions.
To run the IDE, open a terminal and navigate to the path “android-studio/bin/”From there, launch the “studio.sh” script using “./studio.sh”. This will start Android Studio, and from that point on, the behavior will be very similar to other systems: it will ask if you want to import previous configurations and guide you through an initial setup wizard.
If you want the Android Studio icon appear in the applications menu From your desktop environment, you can do this directly from the IDE. Within Android Studio, go to the "Tools" menu and select the "Create Desktop Entry" option. This will create a launcher on your system, so you don't have to manually run "studio.sh" each time.
Initial setup and component selection wizard
On first startup, regardless of the operating system, Android Studio displays a initial setup wizard that helps you get the environment ready.
The first screen usually asks you if you want to do a standard or custom installationThe standard option is more than enough for most people: it installs the default SDK, basic tools, the emulator, and some recommended components.
If you choose the custom installation, you'll be able to adjust more things: SDK path, toolsets, system images for the emulator, etc. It's useful if you work with separate disks or want to have several SDKs organized in a certain way.
Next, the assistant lets you choose the IDE visual themeThey usually offer a light theme and a dark theme, typically called "Darcula." Many developers prefer the dark theme because it's easier on the eyes when you spend many hours programming, but it's a matter of personal preference; in any case, you can change it later in the settings.
Below you will see a summary of the components that will be downloadedThe package includes the Android emulator, the latest stable version of the SDK (e.g., API 28 or higher), platform tools, support repositories, system images for the Intel x86 emulator, and any additional libraries required. The total download size and required disk space are also specified.
When you press “Finish”, Android Studio will begin to download and install all those componentsDepending on your internet connection and the number of components selected, this process may take some time. In some cases, such as installing HAXM on macOS, the system will ask for your administrator password to apply kernel-level changes.
SDK management and update checking
Once Android Studio is installed and open, it is highly recommended. check that everything is up to dateOn the welcome screen, at the bottom, you'll usually see the IDE version number. From there, you can use the "Check for updates" link to see if a newer version is available.
If a new version is detected, Android Studio will offer you the option to download and install it automaticallyThis is usually done via an "Update and Restart" button. This will keep your IDE up-to-date with the latest improvements, bug fixes, and new features.
To manage the SDK and its components, within the IDE you can access the SDKManagerFrom there you can install or remove specific Android platforms (for example, different APIs), additional build tools, system images for the emulator, and other packages such as support repositories or Google Play Services.
You can also configure the SDK path If you already have one installed. This is useful if you're migrating from another machine or if you're sharing the SDK across multiple IDEs or projects. It's important to keep the SDK in a stable location with appropriate permissions, especially in multi-user environments.
Using the Android emulator on your computer
The official emulator included in Android Studio is a key piece of the environment, as it allows you to Test your apps without needing a physical deviceYou use it through the AVD Manager (Android Virtual Device Manager).
To create a new virtual device, open Android Studio and in the main window go to the option of settings and select “AVD Manager”A window will open where you can see the existing virtual devices (if any) and a "Create virtual device" button to create a new one.
When you press it, the assistant will ask you to choose the device type, screen size, category, and resolutionYou can, for example, create a Pixel-like phone, a tablet, a Wear OS watch, or even an Android TV. Next, you'll need to choose the Android version the emulator will run; if you don't have the system image downloaded, you'll be given the option to download it at that point.
In the last step you will put a name the virtual device and confirm the settingsOnce created, you can launch it from within AVD Manager. The emulator will open in a separate window and function like a real device: you can install apps, navigate menus, and use it for development testing.
In addition, the emulator allows you simulate different network conditions, battery level, screen orientation (vertical or horizontal) and other parameters, something very useful to check how your application behaves in situations that would be more cumbersome to reproduce on a physical mobile device.
Test your apps on a real Android device
Although the emulator is very convenient, it's always a good idea test the applications on a real deviceespecially when you want to check performance, gestures, sensors, or integration with specific hardware.
To run apps from Android Studio on your mobile device, you need to enable the USB debugging on the device. To do this, first activate “Developer options” (usually by tapping “Build number” several times in the system information) and then, within that menu, enable “USB debugging”.
Once you've done this, connect your phone to your computer. through a USB cable. If this is your first time, your phone will ask if you trust your computer for debugging; accept the message. Afterward, a drop-down list of available devices should appear in the Android Studio toolbar, next to the run icon.
Select your physical device from that list, make sure you have a project open, and press the green “Play” buttonThe IDE will compile the app, install it on the phone, and run it automatically. From there, you can debug, set breakpoints, view logs in Logcat, and test how the application behaves with a real user.
Creating your first project in Android Studio
Once you have the environment ready, the logical next step is to start creating your first test applicationIt doesn't need to be anything sophisticated; a simple example with a button and some text is enough to understand the basic structure of the project.
From the Android Studio welcome window, click on “Start a new Android Studio project”The wizard will ask you to choose an initial template, which in the simplest case can be an empty activity. This will create a minimal structure with a main screen.
On the next screen you will configure the Project details: app name, package name, disk location, programming language (Java or Kotlin), and minimum API levelFor a first test project, it is sufficient to choose Kotlin and a relatively modern API, such as 23 or higher, so that the app will work on most current devices.
Clicking “Finish” will generate the entire project skeleton and open the IDE with several panels. On the left, you'll see the file and directory structure of the project; on the right, the main editor; and at the bottom, the console with compilation information, errors, and messages.
In the file tree, within “app/java/your_app_package”, you will find the main class (MainActivity)This contains the basic logic of the activity. In “app/res/layout/” you will see the “activity_main.xml” file, which defines the visual layout of that screen using XML. Any changes made in the visual editor will be reflected in this XML file, and vice versa.
Modify that design file to add a TextView and a Button It's a perfect exercise for experimenting. Afterwards, in the code file (MainActivity.kt or .java), you can write a few lines so that when you press the button, the text changes or a message appears. With this, you'll have a functional micro-application ready to test on the emulator or your mobile device.
Analyze and learn from open source projects
Android Studio is not only useful for creating new projects, it's also a great tool for open and study open source projectsExamining how real apps are built is a very powerful way to learn patterns, best practices, and advanced techniques.
For example, if you're interested in seeing how a famous open-source application like Telegram is made, you can access their repository on GitHub and download the project as a ZIP file. Once unzipped, open Android Studio and choose the option “Open an existing Android Studio project” to select the folder of the newly downloaded project.
The IDE will take a little while to load. Index all files, download dependencies, and synchronize GradleAfter that, you can navigate through the project structure, open any class, layout, or graphic resource, and see in detail how certain functionalities have been implemented.
It's important to note that not all applications allow this approach. Many don't publish their code, or do so only partially, and others use techniques of code obfuscation which makes understanding its structure difficult even if you manage to decompile the APK. That's why it's highly recommended to start with clearly open-source projects, such as those you can find in repositories like F-Droid, which compiles many open-source Android apps.
Using Android Studio as a platform to read and modify other people's projects gives you a very useful perspective on how to structure your own applications, how to organize packages, manage dependencies, or implement clean architecture, among many other things.
Properly setting up Android Studio and its SDK involves understanding everything from the license terms and prerequisites such as Java or Visual C++ From the practical use of the emulator and connecting to real devices to creating and launching projects, development becomes much smoother once you've mastered this initial process and have a stable, up-to-date environment. You can focus on writing code, designing interfaces, testing on different devices, and leveraging open-source projects to continue learning and refining your applications. Share this information and more users will learn about the tool.
