あらすじ
Glideの README の「Download」を見ると、Gradle のセットアップ方法が以下のように記載されています。
app/build.gradle
dependencies {
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
}
./gradlew buildコマンドでビルドをしていた時に、Glide で以下のような警告が出ていることに気付きました。
app: 'annotationProcessor' dependencies won't be recognized as kapt annotation processors. Please change the configuration name to 'kapt' for these artifacts: 'com.github.bumptech.glide:compiler:4.11.0'.
解決方法
警告文の通り、app/build.gradleでannotationProcessorとなっている箇所を、kaptに変更してください。
app/build.gradle
dependencies {
def glide_version = "4.11.0"
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"
}
kapt について
kotlin-annotation-processing toolsの略で、Kotlin でもアノテーションを使えるようにするためのツールのようです。
下記の記事が参考になりました。