Questions

Kotlin questions

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

How to Fix Incompatible Kotlin Metadata Version in Android When Updating Stripe

Learn why Kotlin metadata version errors happen in Android, how to fix them after updating Stripe, and how to collect email and cardholder name.

kotlinandroidfluttergradle

How to Fix IntelliJ Kotlin JVM Target Mismatch: 1.8 vs 1.6

Learn why IntelliJ shows a Kotlin JVM target mismatch error and how to align bytecode targets like 1.8 and 1.6 correctly.

kotlinandroidintellij-ideajvm

How to Fix Jackson "No Creators, like default construct, exist" Error in Java Retrofit Deserialization

Learn why Jackson throws the "No Creators" deserialization error in Java Retrofit apps and how to fix it with constructors and annotations.

kotlinandroidserializationjackson

How to Fix KAPT "unrecognized Attribute name MODULE" in Android/Kotlin Builds

Learn what causes the KAPT "unrecognized Attribute name MODULE" build error in Android/Kotlin and how to debug version mismatches safely.

kotlinjavaandroidgradle

How to Fix Kotlin Runtime JAR Version Mismatch Warnings

Learn why Kotlin runtime JAR files must match versions, how classpath mismatches happen, and how to fix them in Gradle projects.

kotlin

How to Fix android:exported Errors in Android 12 Manifest Files

Learn why Android 12 requires android:exported in manifest components and how to fix merge errors in activities, services, and receivers.

kotlinjavaandroidandroid-manifest

How to Fix minCompileSdk AAR Metadata Errors in Android Java or Kotlin

Learn why Android shows minCompileSdk AAR metadata errors and how to fix them by updating compileSdkVersion and dependencies.

kotlinjavaandroidgradle

How to Generate a Random Number in Kotlin

Learn how to generate random numbers in Kotlin, including integers in a range, syntax, examples, common mistakes, and practical use cases.

kotlinrandomjvm

How to Get Context in Jetpack Compose for Toast Messages in Kotlin

Learn how to access Context in Jetpack Compose and show a Toast correctly using LocalContext.current with clear Kotlin examples.

kotlinandroidandroid-jetpackandroid-jetpack-compose

How to Get the Current Index in a for-each Loop in Kotlin

Learn how to get the current index in a Kotlin for-each loop using withIndex(), forEachIndexed(), and simple examples.

kotlinandroidfor-loop

How to Get the Current Unix Timestamp in Android Java

Learn how to get the current Unix timestamp in Android Java, including seconds vs milliseconds, examples, pitfalls, and real use cases.

kotlinjavaandroidtimestamp

How to Handle Try-with-Resources in Kotlin

Learn the Kotlin equivalent of Java try-with-resources using use(), AutoCloseable, and practical resource-handling examples.

kotlintry-with-resources

How to Initialize Arrays in Kotlin with Values

Learn how array initialization works in Kotlin, including arrayOf, primitive arrays, syntax examples, and common mistakes for beginners.

kotlinarrays

How to Initialize an Empty MutableList in Kotlin

Learn how to create an empty MutableList in Kotlin, when to use mutableListOf(), and common mistakes with List vs MutableList.

kotlin

How to Iterate Over a HashMap in Kotlin

Learn how to iterate over a HashMap in Kotlin with for loops, destructuring, keys, values, and practical examples for beginners.

kotlinkotlin-extension

How to Launch an Activity from Another App in Android Using Intents

Learn how to open an installed app or specific Activity from another Android app using Intents, PackageManager, and safe checks.

kotlinjavaandroidandroid-intent

How to Null Check in Kotlin: == vs === Explained

Learn the correct way to check for null in Kotlin. Understand == vs ===, != vs !==, and when structural or referential equality matters.

kotlinkotlin-null-safety

How to Parse JSON in Kotlin: Strings, Objects, and Mapping to Classes

Learn how to parse JSON in Kotlin and map JSON strings to classes using practical examples with Kotlin-friendly JSON libraries.

kotlinjavajson

How to Place the Cursor at the End of an EditText in Android Java

Learn how to keep the cursor at the end of an EditText in Android Java after changing text programmatically.

kotlinjavaandroidandroid-edittext

How to Read Files from src/test/resources in Kotlin

Learn how to read text and HTML files from src/test/resources in Kotlin tests using class loaders and resource streams.

kotlinfile-ioclasspathclassloader

Page 3 of 6 - 112 questions