小编Elt*_*ake的帖子

Android Studio - 无法解析符号“Glide”

我正在尝试在 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'
}
Run Code Online (Sandbox Code Playgroud)

我正在使用以下代码将图像视图设置为 gif。

ImageView img=(ImageView)findViewById(R.id.catImg);
int resourceId = R.drawable.gangrycat;
Glide.with(this.context)
     .load(resourceId)
     .into(img);
Run Code Online (Sandbox Code Playgroud)

gif android-studio android-glide

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

android-glide ×1

android-studio ×1

gif ×1