kmalmur
kmalmur

Reputation: 2839

Kotlin Kapt doesn't show databinding errors when running from Android Studio

I'm using Kotlin kapt version 3, whenever there is a problem with databinding, the build from Android Studio fails with a very generic error:

Error:Execution failed for task ':app:kaptDev21DebugKotlin'.
> Internal compiler error. See log for more details

When I run the same task from the console, the real problem shows up. Somehow the AS doesn't show this error in message window.

I'm using Android Studio version 2.3.3

Upvotes: 6

Views: 587

Answers (2)

Mladen Rakonjac
Mladen Rakonjac

Reputation: 9812

You can see the error in Gradle Console, something similar to this :

enter image description here

Upvotes: 1

Sachin Chandil
Sachin Chandil

Reputation: 17809

Android Studio 3.0 and later version of android studio support Kotlin better. AS 3.0 comes with default support with Kotlin as AS 2.3 requires a plugin to be installed.

Android Studio Team from google and IDEA intellij Team from JetBrain working together to make Kotlin compatible with Android Studio.

Right now 3.0 version comes with Canary version(Preview version) and every week a new preview version (Canary 1, Canary 2 ... and so on) rolls out fixing reported bugs.

So you should try Android Studio 3.0 Canary 9 latest version as of now.

If still problem persists, report this bug.

Upvotes: 0

Related Questions