Complete Android Studio Tutorial with Java

Updated on 28/08/20253,843 Views

This Android Studio tutorial provides a step-by-step guide for beginners to get started with Android app development. It covers the installation process, setting up the development environment, creating a new project, adding layouts, and running the app on an emulator or device. The tutorial also introduces the basic project structure so you can understand how Android apps are organized. 

By following this tutorial, you will learn the fundamental skills required to build and test your first Android application using Android Studio. The focus is on practical implementation, making it easier to grasp the workflow of Android development from the ground up. 

Want to strengthen your Java skills with real-world coding challenges? Check out our Software Engineering Courses and get hands-on practice to level up your programming expertise 

What is Android Studio? 

Android Studio is the official Integrated Development Environment (IDE) for Android app development, built on IntelliJ IDEA. It offers a comprehensive suite of tools including a smart code editor, visual layout designer, performance monitors, and an emulator for testing. Developers can use it to build applications for smartphones, tablets, wearables, TVs, foldables, and Android Auto. 

Take charge of your tech career with future-ready skills in Cloud, DevOps, AI, and Full Stack Development. Learn from top industry experts, work on real-world projects, and build the expertise that global employers are looking for. 

  • Professional Certificate Program in Cloud Computing and DevOps
  • AI-Powered Full Stack Development Course by IIITB
  • Future-Proof Your Tech Career with AI-Driven Full-Stack Development

With support for Java, Kotlin, and C++, Android Studio streamlines the development process by integrating coding, debugging, testing, and deployment in a single environment. Its flexibility and powerful features make it the primary choice for creating high-quality Android applications. 

Android Studio Tutorial for Beginners

If you’re just getting started with app development, this Android Studio Tutorial for beginners will help you install and configure the IDE step by step. By the end of this setup, you’ll have the essential SDK tools, build components, and settings ready to begin creating your first Android application. 

Follow these steps to install Android Studio on your machine.

1. Download the latest version of Android Studio from developer.android.com.

2. Run the exe installer and follow the setup wizard to install Android Studio and any required SDK tools.

3. During setup, select the Android SDK components you need, like the SDK platform for the version of Android you want to target, build tools, etc.

4. Start Android Studio after the installation is complete. On the first run, it will install any missing SDK tools and set up the IDE.

5. When prompted, import settings from a previous IDE like Eclipse to migrate them.

6. Once Android Studio opens, go to Configure > Settings to change any default IDE settings as per your preference.

Android Studio is now ready to build your first app.

Build a Simple App in Android Studio with Java

Follow these steps to create and run your first simple app.

1. Launch Android Studio and click on Start a new Android Studio project.

2. Select Empty Activity and click Next.

3. Enter the app name, package name, etc., and click Finish.

4. Create a layout folder and a new Layout Resource File named activity_main.xml layout file. Add a TextView or Button with the code provided below.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="16dp"
        android:textSize="20sp" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Click Me"
        android:layout_gravity="center_horizontal"
        android:layout_marginTop="16dp"/>

</LinearLayout>

5. Select a device like the emulator or physical device to run the app on.

6. Click the green ▶ icon or Run > Run App to build and run the app.

Your first simple app with some text is now running.

How to Install Android Virtual Device(AVD)?

Follow these steps to create an Android Virtual Device (AVD) to run apps.

1. In Android Studio, go to Tools > AVD Manager.

2. Click +Create Virtual Device

3. Select a hardware profile like Pixel and click Next

4. Download an Android version like API 30

5. Click Next and verify the AVD configuration

  1. Click Finish to create the AVD
  2. To run an app on it, select the AVD in the run configurations

Now you have an AVD ready for your Android development journey.

File Structure

Android Studio’s File Structure

The key folders and files under android studio are app/src/main, and you might work with these if you're planning to build a simple app in Android Studio with Java:

  • java - Contains the Java source code organized as packages
  • res - Has all the resource files like images, strings, etc
  • AndroidManifest.xml - Contains app permissions, components, device features used, etc.
  • kotlin - Has Kotlin source code

res/values Folder in Android Studio

The res/values folder contains XML files that store simple values like roid Studio.

  • strings.xml - Contains string constants like labels, messages, etc.
  • styles.xml - Contains styles for UI components.
  • colors.xml - Contains color values used in the app.
  • dimens.xml - Contains dimension values like padding, text sizes, etc.

Where is debug.keystore in Android Studio?

The debug.keystore file used to sign debug builds is located at:

Windows - C:\Users<user>.android\debug.keystore

Conclusion

This Android Studio tutorial for beginners highlighted the essential steps and features required to begin Android app development. From installation and setup to building and running a simple app, it demonstrated how Android Studio simplifies the development process. With its intelligent code editor, layout tools, debugging options, emulator, and integrations with GitHub and Firebase, Android Studio provides everything needed to create efficient and high-quality applications. 

Beginners are encouraged to start experimenting with small projects to strengthen their skills, while advanced learners can explore the official Android developer documentation for in-depth techniques. With consistent practice, Android Studio becomes a powerful platform to bring innovative Android applications to life. 

FAQs

1. What are the system requirements for Android Studio?

The minimum system requirements for Android Studio are 4GB RAM, 2 GB disk space, and 1280x800 minimum screen resolution. Latest stable versions of JDK and Android SDK are also needed.

2. What is ProGuard in Android Studio?

ProGuard is a code optimization tool included in Android Studio that performs several functions to reduce the size of Android apps and make them harder to reverse engineer. It works by shrinking, obfuscation and optimization of the code.

3. What are the main benefits of ProGuard?

The main benefits of using ProGuard are: Smaller app size leading to faster downloads and lower storage requirementsProtection against reverse engineering by obfuscating codeOptimization for better performance and efficiency Smaller app size leading to faster downloads and lower storage requirements Protection against reverse engineering by obfuscating code Optimization for better performance and efficiency

FREE COURSES

Start Learning For Free

image
Pavan Vadapalli

Author|911 articles published

Pavan Vadapalli is the Director of Engineering , bringing over 18 years of experience in software engineering, technology leadership, and startup innovation. Holding a B.Tech and an MBA from the India....

image
Join 10M+ Learners & Transform Your Career
Learn on a personalised AI-powered platform that offers best-in-class content, live sessions & mentorship from leading industry experts.
advertise-arrow

Top Resources

Recommended Programs

Free Courses

Explore Our Free Software Tutorials

upGrad Learner Support

Talk to our experts. We are available 7 days a week, 10 AM to 7 PM

text

Indian Nationals

text

Foreign Nationals