Kotlin or Java?
You are about to build Sprout, a small app that reminds you when to water your plants. Before the first line, you must pick a language. Android gives you two real choices, and the decision is easier than it looks.
The rule
Write new code in Kotlin; Java still runs beside it.
Kotlin is Google's recommended language for Android. Most new libraries, documentation and samples are written for it, and Jetpack Compose, the modern way to build screens, can only be used from Kotlin.
Java was Android's original language. Millions of lines of existing apps are written in it, and it is still fully supported.
The two are not rivals inside a project. Both compile to JVM bytecode, which the Android build then turns into DEX files that the device runs. So a Kotlin class can call a Java class and the other way round:
// Kotlin file calling an old Java helper
val days = WateringCalculator.daysUntilDry(plant) // WateringCalculator.javaKotlin also removes whole groups of bugs: types are non-null unless you add ?, so the compiler catches many null mistakes before the app ever runs.