Questions

Kotlin questions

Choose a question page, learn the concept, then test your understanding with a quiz.

Difference Between List and Array in Kotlin

Learn the difference between List and Array in Kotlin, including mutability, size, APIs, performance, and when to use each one.

kotlinarrayslist

Disable plain JAR Files in Spring Boot 2.5 with Gradle

Learn why Spring Boot 2.5 creates a plain JAR alongside the executable JAR and how to disable Gradle's standard jar task safely.

kotlinjavaspringspring-boot

Fix Could Not Find Method kapt() in Android Gradle Kotlin

Learn why Gradle cannot find kapt(), how Kotlin plugins create dependency configurations, and how to fix kapt in Android modules.

kotlinandroidgradleandroid-gradle-plugin

Fix Hilt Unsupported Metadata Version Error in Kotlin

Learn why Hilt fails with an unsupported metadata version in Kotlin and how to fix version incompatibility in Android projects.

kotlinandroid-studiomobileandroid-jetpack-compose

Fix Incompatible Kotlin Metadata Version Error in Android/Gradle

Learn why the Kotlin metadata version error happens in Android builds and how to fix mismatched Kotlin and Gradle versions safely.

kotlinandroidandroid-studio

Fix Java and Kotlin JVM Target Mismatch in Android Gradle Builds

Learn why Android builds fail when Java and Kotlin target different JVM versions, and configure Gradle, Kotlin, KAPT, and toolchains correctly.

kotlinandroidandroid-studiogradle

Fix KaptExecution Error in Android Kotlin: Data Binding and Build Generation

Learn why KaptExecution fails in Android Kotlin builds, especially with data binding and generated classes, and how to fix it step by step.

kotlinandroidandroid-studio

Fix Kotlin Gradle Dependency Resolution Errors for kotlin-stdlib-jre7

Learn why Gradle cannot find Kotlin stdlib dependencies and how to configure repositories and versions correctly in Android projects.

kotlinandroidandroid-gradle-plugin

Fix Kotlin Unresolved Reference: println in IntelliJ IDEA

Learn why Kotlin shows an unresolved reference for println in IntelliJ IDEA and how SDK, source roots, and Kotlin dependencies fix it.

kotlinintellij-ideajvm

Fix Kotlin Version Mismatch Between Gradle and Android Studio Plugin

Learn why Kotlin version mismatch happens between Gradle and Android Studio, and how to fix it safely in Android projects.

kotlinandroid-studio

Fix Kotlin findViewById Type Inference Errors in Android

Learn why Kotlin cannot infer findViewById view types in Android and how explicit generic types make ListView adapter code compile safely.

kotlinandroidandroid-8.0-oreo

Fix ListAdapter Updates in RecyclerView with Kotlin DiffUtil

Learn why Kotlin ListAdapter may skip updated RecyclerView rows and how immutable list snapshots make DiffUtil detect changes correctly.

kotlinandroidlistadapter

Fix Outdated Kotlin Runtime Warnings in Android Studio Gradle Projects

Learn why Android Studio reports an outdated Kotlin runtime and how to align Kotlin Gradle plugin and stdlib versions manually.

kotlinandroidandroid-studiokotlin-android-extensions

Fix PendingIntent FLAG_IMMUTABLE or FLAG_MUTABLE Error in MediaSessionCompat on Android 12+

Learn why MediaSessionCompat crashes on Android 12+ with PendingIntent flags and how to fix it using updated AndroidX media libraries.

kotlinjavaandroidandroid-studio

Fix Unresolved Reference kotlinx in Kotlin Android Projects

Learn why Kotlin Android synthetic imports show “Unresolved reference: kotlinx” and how to use the modern View Binding replacement.

kotlinandroid-studiokotlin-android-extensions

Fix compileJava and compileKotlin JVM Target Mismatch in Gradle Kotlin DSL

Learn how to set matching Java and Kotlin JVM targets in build.gradle.kts and fix compileJava 11 vs compileKotlin 1.8 errors.

kotlinjavaandroid-gradle-plugindependencies

Fix registerResGeneratingTask Deprecated Warning in Android Gradle

Learn why registerResGeneratingTask is deprecated in Android Gradle Plugin 3.0 and how to register generated folders correctly.

kotlinandroidandroid-studiogradle

Fixing "Default Interface Methods" Error in Android: Java 8, D8, and LifecycleObserver

Learn why Android shows the default interface methods error, how Java 8 affects minSdk, and how to fix it with D8 and Android lifecycle libraries.

kotlinandroidjava-8

Fixing "Inappropriate Blocking Method Call" in Kotlin Coroutines

Learn why Kotlin shows "inappropriate blocking method call" and how to correctly use blocking APIs like OkHttp and Moshi in coroutines.

kotlinokhttpkotlin-coroutinesmoshi

Fixing "navigation destination is unknown to this NavController" in Android Navigation

Learn why Android Navigation throws "destination is unknown to this NavController" and how to fix graph, action, and Fragment issues.

kotlinandroidandroid-architecture-navigationandroid-navigation

Page 2 of 9 - 162 questions