1

I am getting this error on AS after including Kotlin's annotation processor support (kapt) with apply plugin: 'kotlin-kapt' in my app's build.gradle

Folder .../app/build/generated/source/kaptKotlin/

Folder .../app/build/generated/source/kaptKotlin/

3rd-party Gradle plug-ins may be the cause

I just need to disable this red warning (which is now preventing me from building the app), as I've looked into the bug report itself and this answer and found out that the generated build folders from kapt are considered 'invalid' to Android Studio.

I tried to uncheck some related warnings in AS's Settings -> Inspections but could not find the right one to disable this specific one.

If I don't include apply plugin: 'kotlin-kapt', I get this runtime error:

Cause: app: Original kapt is deprecated. Please add "apply plugin: 'kotlin-kapt'" to your build.gradle.

How may I disable this warning?

Fawwaz Yusran
  • 1,260
  • 2
  • 19
  • 36

1 Answers1

3

I solved this problem removing Instant App Provision from
Run -> Edit Configurations

enter image description here

In my case Instant App Provision kept coming back from time to time, so I just kept removing it until it was fixed.

giudigior
  • 146
  • 6