Gradle DSL method not found: \'kapt()\' Possible causes: The project \'jetpacklearn\' may be using a version of the Android Gradle plug-in that does not contain the method (
The answer https://stackoverflow.com/a/56101024/6007104 is absolutely correct.
But, for people using the gradle plugins block, it looks like this:
plugins {
id('kotlin-kapt')
}
add this line
apply plugin: 'kotlin-kapt'
if you used kapt in android library you must add kotlin-android plugin in your project
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
Add this in your build.gradle then sync the gradle again.
apply plugin: 'kotlin-kapt'
Check if you have this in top of your app build.gradle?
apply plugin: 'kotlin-kapt'
just add this line in your app-level of build.grale :
apply plugin: 'kotlin-kapt'
NOTE: under apply plugin: 'com.android.application'
Your build.Gradle file should have these at the top
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'