So, you’ve installed Android Studio on your Windows 11 PC and configured all the SDK tools — now it’s time to take the exciting next step: building your first Android app!
Whether you’re a student learning mobile development or a hobbyist exploring app creation, Android Studio makes it easy to design, code, and test Android apps right from your computer.
In this guide, we’ll walk you through how to create your very first Android app in Android Studio — from setting up a new project to running it on the built-in emulator or a real Android device.
What You’ll Need
Before you start building your app, make sure you’ve got the following ready:
- Android Studio installed on Windows 11
- Java JDK or Kotlin support enabled (comes built-in with Android Studio)
- Android SDK properly configured
- Optional: Android Emulator or a physical Android device for testing
If you haven’t installed Android Studio yet, check out our full guide: “How to Install Android Studio on Windows 11.”
Step 1: Launch Android Studio
- Open Android Studio from the Start Menu or desktop shortcut.
- On the welcome screen, click New Project.
- If you already have other projects, go to File → New → New Project.
Tip: If this is your first time running Android Studio, it may take a minute to initialize all SDK components.
Step 2: Choose a Project Template
Android Studio offers several project templates to speed up development:
- Empty Activity – Best for beginners
- Basic Activity – Includes toolbar and floating action button
- Navigation Drawer Activity – Adds a side menu layout
- No Activity – Starts with a blank project structure
For this tutorial, select Empty Activity and click Next.
Step 3: Configure Your Project
Now you’ll set the basic details of your app.
- Name: Enter your app’s name — e.g., MyFirstApp.
- Package name: This uniquely identifies your app (e.g., com.example.myfirstapp).
- Save location: Choose where to store your project files.
- Language: Select either Java or Kotlin (Kotlin is now the recommended choice).
- Minimum SDK: Choose the lowest Android version your app supports.
- Android 8.0 (Oreo, API 26) is a good starting point for beginners.
- Click Finish to create your project.
Android Studio will now build the project and set up the necessary folders and Gradle files.
Note: The first build may take a few minutes as Android Studio downloads dependencies.
Step 4: Understand the Project Structure
After your project opens, you’ll see several folders on the Project panel (usually on the left). Here’s what they mean:
- app/ – Main project module
- java/ – Contains your source code files
- res/ – Stores resources such as layouts, images, and strings
- AndroidManifest.xml – Defines essential app components
- Gradle Scripts/ – Handles project configuration and dependencies
Tip: You can expand or collapse these folders to explore how Android Studio organizes your project files.
Step 5: Design Your App Layout (activity_main.xml)
Your app’s interface is defined in XML layout files. To modify it:
- Open res → layout → activity_main.xml.
- You can switch between Design View (drag and drop UI elements) and Code View (XML markup).
- Add a simple TextView element to display a message:
<TextView
android:id="@+id/helloText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, Android!"
android:textSize="24sp"
android:layout_gravity="center"
android:layout_marginTop="200dp"/>
Tip: Use the Component Tree on the left to rearrange UI elements easily.
Step 6: Write Some Code (MainActivity.java / .kt)
Next, let’s make the app respond to user actions.
- Open java → com.example.myfirstapp → MainActivity.java (or .kt).
- Replace the existing code with this simple example:
For Kotlin:
package com.example.myfirstapp
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.TextView
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val textView = findViewById<TextView>(R.id.helloText)
textView.text = "Hello, World from Android Studio!"
}
}
For Java:
package com.example.myfirstapp;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView textView = findViewById(R.id.helloText);
textView.setText("Hello, World from Android Studio!");
}
}
Pro Tip: Android Studio provides auto-completion and syntax highlighting to make coding faster and easier.
Step 7: Run the App on an Emulator or Physical Device
Now that your app is ready, it’s time to see it in action!
Option 1: Use Android Emulator
- Click the Device Manager icon (or Tools → Device Manager).
- Create a new virtual device — e.g., Pixel 7 API 34.
- Click Run ▶️ on the toolbar to build and launch the app.
Option 2: Use a Physical Device
- Connect your Android phone via USB.
- Enable Developer Options → USB Debugging on your device.
- Select your device from the Run menu in Android Studio.
Tip: The first build might take longer; future builds will compile faster.
Step 8: Test and Modify Your App
Once the app runs, you should see your “Hello, World” text on the screen.
Try customizing it:
- Change the text in the XML file.
- Add a Button and handle clicks in your
MainActivity. - Experiment with colors in res → values → colors.xml.
Each time you make changes, click Run ▶️ again to test updates instantly.
Wrapping Up
Congratulations — you’ve just created your first Android app in Android Studio!
You learned how to:
- Set up a new Android project
- Design a simple UI
- Write and run code
- Launch your app on an emulator or physical device
This is just the beginning of your Android development journey. Next, you can learn how to add buttons, layouts, and navigation to make your app interactive.
Keep experimenting, and soon you’ll be building full-featured Android apps in no time!