- 在
build.gradle
添加
apply plugin: 'kotlin-kapt'
repositories {
mavenCentral()
maven { url 'https://maven.google.com' }
}
dependencies {
compile 'com.github.bumptech.glide:glide:4.11.0'
kapt 'com.github.bumptech.glide:compiler:4.11.0'
}
- 在代码中使用
Glide.with(fragment)
.load(myUrl)
.into(imageView);