Welcome to Day 4 of the 90-Day Android Developer Roadmap at HandsOnAndroid! ๐
In Day 1, we covered the roadmap.
In Day 2, you installed Android Studio.
In Day 3, we chose Kotlin.
Today, itโs time to build your first Android app! ๐
๐ ๏ธ Step-by-Step: Create Your First Android App
๐น Step 1: Open Android Studio
Launch Android Studio and click โNew Project.โ
๐น Step 2: Select โEmpty Activityโ
Choose โEmpty Activityโ โ click Next
๐น Step 3: Configure the App
- Name: HelloAndroid
- Language: Kotlin
- Minimum SDK: API 21 (Lollipop)
- โ Click Finish
๐น Step 4: Understand the Project Structure
MainActivity.kt
: Your entry point (Kotlin file)res/layout/activity_main.xml
: Your appโs layout (UI)AndroidManifest.xml
: App declaration info
๐น Step 5: Update Layout XML
Open activity_main.xml
and replace the content:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, Android!"
android:layout_gravity="center"
android:textSize="24sp" />
๐น Step 6: Run the App
Click โถ๏ธ Run โ Select Emulator โ See the magic! ๐
๐ท Preview
Once the app runs on the emulator, youโll see:
๐ข โHello, Android!โ centered on a white screen.
Thatโs it โ your first Android app is live! ๐
๐ง What You Learned Today
- Creating a new Android project
- Basic Kotlin Activity + XML layout
- Running your app in an emulator