Reputation: 929
I've seen many others having this problem but not of the recommendations work for me. I have a Kotlin Android app. My build.gradle Module:app has the following.
buildscript {
ext.kotlin_version = '1.3.21'
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
...
androidExtensions {
experimental = true
}
dependencies {
def lifecycle_version = "2.0.0"
...
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
kapt 'com.github.bumptech.glide:compiler:4.9.0'
I also have an AppGlideModule defined like this:
import com.bumptech.glide.annotation.GlideModule
import com.bumptech.glide.module.AppGlideModule
@GlideModule
class MyAppGlideModule : AppGlideModule()
When I try to use GlideApp though, it still shows the UnresolvedReference for it. I can see Glide just fine though.
Any other suggestions? I've tried rebuilding several times as well.
Upvotes: 2
Views: 1862
Reputation: 929
Had to invalidate cache then bounce Android Studio. Still didn't work when I built the project, but went into the class that I was calling GlideApp in and manually added the import after I saw where the generated file was. Must just be some bug in the interaction between Glide/Kotlin/Android Studio
Upvotes: 1