Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find method kapt() for Glide

apply plugin: 'com.google.gms.google-services' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt'  classpath 'com.android.tools.build:gradle:3.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.61" 

I have the above gradle configuration, and still I am getting

Could not find method kapt() for arguments [com.github.bumptech.glide:compiler:4.3.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. 

Can someone tell me where am I going wrong? Thanks for the help in advance

like image 749
Rajas47Ashtikar Avatar asked Sep 30 '18 17:09

Rajas47Ashtikar


2 Answers

The project-level build.gradle:

buildscript {     repositories {         mavenCentral()         jcenter()         google()     }     dependencies {         classpath "com.android.tools.build:gradle:3.3.2"         classpath "com.google.gms:google-services:4.2.0"         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.70"     } } 

The module-level build.gradle:

apply plugin: "kotlin-android" apply plugin: "kotlin-android-extensions" apply plugin: "kotlin-kapt" ... android {  }  dependencies {     implementation "com.github.bumptech.glide:glide:4.8.0"     // annotationProcessor "com.github.bumptech.glide:compiler:4.8.0"     kapt "com.github.bumptech.glide:compiler:4.8.0" } ... apply plugin: "com.google.gms.google-services" 
like image 175
Martin Zeitler Avatar answered Oct 18 '22 14:10

Martin Zeitler


plugins {     id 'com.android.application'     id 'kotlin-android'     id 'kotlin-android-extensions'     id 'kotlin-kapt' // add this line in file build.gradle (Module : YourAppName) } 
like image 27
Fortran Avatar answered Oct 18 '22 13:10

Fortran