Questions

Kotlin questions

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

How to Debug “Unfortunately, MyApp Has Stopped” in Android

Learn how to diagnose and fix the Android “Unfortunately, app has stopped” crash using Logcat, stack traces, and debugging steps.

kotlinjavaandroiddebugging

How to Diagnose ':app:compileDebugKotlin' Compilation Errors in Android Gradle Builds

Learn how to troubleshoot Android ':app:compileDebugKotlin' errors by reading the real compiler output and checking Gradle and Kotlin setup.

kotlinandroidgradlebuild

How to Fix Deprecated Gradle Features Used in This Build for JUnit 5 and Android Gradle

Learn why deprecated Gradle features appear with JUnit 5 and Android builds, and how to diagnose and fix them safely.

kotlinandroidunit-testinggradle

How to Fix Duplicate Kotlin Stdlib Class Errors in Android Gradle

Learn why duplicate Kotlin stdlib class errors happen in Android and how to fix version conflicts in Gradle dependencies safely.

kotlinjavaandroiddependencies

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 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 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 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 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 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 Set Text in an EditText in Kotlin

Learn why EditText.text expects Editable in Kotlin and how to correctly set and read text using setText(), text, and toString().

kotlinandroidandroid-edittext

How to Use break and continue with forEach in Kotlin

Learn why break and continue do not work directly in Kotlin forEach, and how to use labels, returns, and regular loops instead.

kotlinloopsforeachlambda

How to Vibrate an Android Device in Java: Vibrator and VibrationEffect

Learn how to make an Android device vibrate in Java using Vibrator and VibrationEffect, including patterns, permissions, and common pitfalls.

kotlinjavaandroidvibration

Java Static Methods in Kotlin: Equivalents and Best Practices

Learn how Kotlin replaces Java static methods using top-level functions, companion objects, and objects with clear examples.

kotlinjavastaticstatic-methods

Page 2 of 4 - 62 questions