Android Studio, Project Structure & First App
Install Android Studio
Android Studio is the official IDE. It bundles the SDK, an emulator, and the Gradle build system. Install it, open it once so it downloads the SDK, then create a new project with Empty Views Activity and language Kotlin.
Project structure explained
app/src/main/java/— your Kotlin code (Activities, classes).app/src/main/res/layout/— XML screen layouts.res/values/— strings, colors, themes.res/drawable/— images and shapes.AndroidManifest.xml— app declaration.build.gradle (Module: app)— dependencies and SDK versions.
Gradle and dependencies
Gradle builds your app. You add libraries in the module build.gradle:
dependencies {
implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
}
Run your app
Create an emulator in Device Manager or plug in a real phone with USB debugging on, then press ▶ Run.
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
Tip:minSdksets the oldest Android version you support;targetSdkis the version you built and tested against. KeeptargetSdkcurrent for Play Store.