LoginSignup
1
0

More than 3 years have passed since last update.

【Android】公式に記載されている Glide のセットアップ方法は間違っている

Posted at

あらすじ

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.gradleannotationProcessorとなっている箇所を、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 でもアノテーションを使えるようにするためのツールのようです。
下記の記事が参考になりました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0