Thuta Learning
BasicMobile Developmentintermediate

Your First App — Hello World

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand Your First App — Hello World without any of the intimidation
  • Be able to run Android Studio/Compose code yourself
  • Apply this concept immediately in a real project

Let's think about it for a second

Running an app on the emulator (or a physical device) is as simple as clicking the 'Run' button (▶) — Android Studio compiles your code, builds an APK (Android Package), and installs/launches it on the device. If your root composable is called inside a `setContent { }` block, that UI will appear immediately when the app opens.

Let's connect this to a real-world scenario

If `MainActivity.kt` contains `setContent { Greeting("Android") }`, then clicking Run will immediately show 'Hello, Android!' on the emulator screen — that's your very first real Android app.

Let's look at an example together

kotlin
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            Greeting(name = "Android")
        }
    }
}
You should see
You should see the text 'Hello, Android!' on the emulator screen.

Try it in 5 minutes

Edit `MainActivity.kt`, add `setContent { Greeting("Android") }`, and click the 'Run' button — confirm the app launches instantly on the emulator.

A quick word of caution

Your first build can take a few minutes (depending on your internet connection) because Gradle needs to download dependencies — don't assume it's 'stuck', just watch the progress in the Build tab.

Easy traps

  • Clicking 'Run' without launching an emulator first — you'll get a prompt to choose a target device, so it's better to have the emulator already running
  • Skimming past a build error message and giving up because 'I have no idea what this means' — it's important to learn to debug by referencing the error line number in the Build tab

Now try it yourself

Edit `MainActivity.kt`, add `setContent { Greeting("Android") }`, and click the 'Run' button — confirm the app launches instantly on the emulator.

You'll know it worked when: You should see the text 'Hello, Android!' on the emulator screen.

Your First App — Hello World | Thuta Learning