Android is the operating system on most of the phones in the world. An Android developer builds the apps on those phones: banking, delivery, maps, learning, health, games. Companies hire Android developers to build and maintain these apps, and small teams and freelancers build their own products too. The good news for a learner is that you can start on almost any computer. Android Studio runs on Windows, macOS and Linux, and every tool you need is free.
Modern Android work uses three main ideas, and you will meet all of them in this course. Kotlin is the programming language Google recommends for Android. It is short, readable and safe. Jetpack Compose is the modern toolkit for building screens: you write functions that describe the screen, and Android draws it. Android Studio is the program where you write, build and test the app. Older apps use Java and XML layout files, and you will still see them at work, but new apps are written in Kotlin with Compose, so that is what we teach.
What you will build in this course
This is a hands-on course. After two lessons that teach the Kotlin language, you build ten complete applications, each one a little harder than the last, and each one teaches one group of skills that real teams use.
- Tip calculator: screens, state and input.
- To-do list: lists, ViewModel and state hoisting.
- Unit converter: forms, menus and validation.
- Quiz app: several screens with navigation.
- Notes app: a database on the phone with Room.
- Weather app: loading data from the internet with Retrofit and coroutines.
- Expense tracker: money, Flow and totals from a database.
- Posts reader: images, search, pull to refresh and a detail screen.
- Habit tracker: saved settings with DataStore and a daily reminder with WorkManager.
- Recipe book: a capstone with Hilt, Retrofit, Room and bottom navigation.
The last two lessons cover testing and releasing an app to the Google Play Store. Everything is in plain English, and every project lists its files, its steps and what you should see on screen.
Install Android Studio
- Go to the official Android developer website, search for Android Studio and download the version for your system. It is free.
- Run the installer and accept the standard setup. It downloads the Android SDK, the tools that build apps, and may take a while.
- Open Android Studio. On first start it offers to install more components. Let it finish.
- Check that your computer has enough free disk space and memory. Emulators are heavy, and a computer with 8 GB of memory is the practical minimum. If yours is slow, you can run your app on a real Android phone instead (the next section shows how).
Create your first project
- Choose New Project and pick the Empty Activity template. This template uses Kotlin and Jetpack Compose.
- Name it
Hello. Keep the package name suggested, such ascom.example.hello. The package name is the unique ID of your app. - Choose a Minimum SDK. API 26 or higher is a sensible choice today, because it covers nearly all active phones while giving you modern features. Android Studio shows the percentage of devices each choice covers.
- Click Finish and wait. The first Gradle sync downloads libraries and can take several minutes. The bottom bar shows progress.
Gradle is the build tool. It reads the build files, downloads the libraries you ask for and turns your code into an installable app file called an APK or an AAB. You will edit one file often: app/build.gradle.kts, where you add libraries in a block called dependencies.
The project structure
Android Studio shows many folders. These are the ones that matter now.
Hello/
app/
build.gradle.kts libraries and app settings (you edit this)
src/main/
AndroidManifest.xml the app's ID card: name, icon, screens, permissions
java/com/example/hello/
MainActivity.kt the first screen that opens
ui/theme/ colours, fonts and the app theme
res/ images, icons, strings
build.gradle.kts settings shared by all modules
gradle/libs.versions.toml one list of library versions
Open MainActivity.kt. It contains code like the one below. Names may differ slightly between Android Studio versions, and that is fine.
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MaterialTheme {
Greeting("Android")
}
}
}
}
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}
An Activity is one screen of the app, and onCreate runs when it opens. setContent says: draw this with Compose. Greeting is a composable function, marked with @Composable. It does not return anything. It describes a piece of screen, here one line of text. That single idea, small functions that describe the screen, is the whole of Compose.
Run it
- Open Device Manager in Android Studio and create a virtual device, for example a recent Pixel phone. Download the system image when asked.
- Choose the device at the top of the window and press the green Run button.
- The emulator starts, which can take a minute the first time. Then your app opens and shows the greeting.
To use a real phone instead, open Settings, tap the build number seven times to unlock Developer options, turn on USB debugging, connect the phone with a cable and allow the computer. The phone then appears in the device list.
Now make a change. Edit the text to say Hello, my first app! and run again. Add a second Text line below the first one. If both appear on the same line or overlap, that is a first lesson in layout: you will fix it in lesson 4 with a Column. This loop of change, run, look is how you will learn the rest of the course.
Your task
- Install Android Studio and create a project from the Empty Activity template named Hello.
- Run it on an emulator or a real phone and see the greeting.
- Change the greeting text to your own name and run it again.
- Open
AndroidManifest.xmland find the app name and the line that marksMainActivityas the screen that opens first.
How to check it worked
- The emulator or phone shows your changed text.
- Gradle finishes the sync with no red errors.
- You can say in one sentence what an Activity, a composable and Gradle are.