【发布时间】:2019-11-13 23:51:22
【问题描述】:
我正在尝试在 Android Studio 中使用 glide 来处理来自存储在 R.drawable 中的资源的 Gif 动画,但我得到“无法解析 sysmbol 'Glide'”。
我在 builde.gradle 中的依赖项中添加了 glide
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
}
我正在使用以下代码将图像视图设置为 gif。
ImageView img=(ImageView)findViewById(R.id.catImg);
int resourceId = R.drawable.gangrycat;
Glide.with(this.context)
.load(resourceId)
.into(img);
【问题讨论】:
-
我已经设法修复它,TBH 我觉得有点愚蠢。
标签: android-studio gif android-glide