Top "Kotlin" questions

Kotlin is an open-source, statically typed programming language supported and developed by JetBrains.

RegisterResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)

Using new android studio with new 3.0.0 Gradle pluging. When building some warning happened: registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)

android android-studio gradle kotlin android-studio-3.0
Total row count for pagination using JPA Criteria API

I am implementing "Advanced Search" kind of functionality for an Entity in my system such that user can search that …

java hibernate jpa kotlin pagination
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

All of sudden I start getting this error, and I am not getting idea why if anyone just let me …

android android-studio kotlin
Swift 'if let' statement equivalent in Kotlin

In Kotlin is there an equivalent to the Swift code below? if let a = b.val { } else { }

kotlin
What is the equivalent of Java static final fields in Kotlin?

In Java, to declare a constant, you do something like: class Hello { public static final int MAX_LEN = 20; } What is …

java kotlin
"Not enough information to infer parameter T" with Kotlin and Android

I'm trying to replicate the following ListView in my Android app using Kotlin: https://github.com/bidrohi/KotlinListView. Unfortunately I'm …

android kotlin android-8.0-oreo
NullPointerException when trying to access views in a Kotlin fragment

How to use Kotlin Android Extensions with Fragments? If I use them inside onCreateView(), I get this NullPointerException exception: Caused …

android kotlin kotlin-android-extensions
Kotlin: Equivalent of getClass() for KClass

In Java we can resolve a variable's class through getClass() like something.getClass(). In Kotlin I am aware of something.…

java class kotlin
How can I create an array in Kotlin like in Java by just providing a size?

How can I create a Array like we do in java? int A[] = new int[N]; How can I do …

java arrays arraylist kotlin
throws Exception in a method with Kotlin

I'm trying to convert this Java code to Kotlin: public class HeaderInterceptor implements Interceptor { @Override public Response intercept(Chain chain) …

java kotlin kotlin-extension