Search code examples
libgdxkotlin

libGDX with Kotlin error "org.jetbrains.kotlin.kapt.idea.KaptModelBuilderService"


I'm trying to create libGDX with Kotlin option. After creating a project with libGDX, opening it with Android Studio. IDE give the error below:

Error:Could not initialize class org.jetbrains.kotlin.kapt.idea.KaptModelBuilderService

What wrong with my project? Thanks in advance.


Solution

  • Error due to Version mismatch between Kotlin plugin and Gradle.

    Here is the similar issue tracked at JetBrains issue tracker, also there is post for the same issue.


    Try to disable Kotlin plugin and update to latest version.

    I've no issue while using Kotlin in Android Studio 3.0.1.

    I'm using :

    • Gradle version 3.3
    • Kotlin plugin version 1.2.10-release-studio3.0-1
    • Kotlin version 1.2.10
    • Android-gradle-plugin version 2.3.3
    • LibGDX 1.9.8