After adding Kapt plugin - A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

后端 未结 7 2160
遥遥无期
遥遥无期 2020-12-21 00:07

First of all,

I\'m pretty much aware that a lot of questions on this error had been posted already here, and none of them seems to be having a proper solution especia

7条回答
  •  醉话见心
    2020-12-21 00:18

    After a week's struggle, I finally found the issue.

    I added the kotlin-kapt plugin for realm.

    And I had a folder named interface itself to hold some interfaces.

    I implemented one of the interfaces from the interface folder in MainActivity.

    Now the import for the interface was something like this,

    import com.android.app.java.interface.Listener

    Where, the keyword interface confused the annotation processor, hence caused error while generating stub.

    I renamed the folder (from interface to intrface).

    That solved the error.

    This is a very simple mistake that cost me a week.

    Anyway, found the issue. Yay!

提交回复
热议问题