Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - cannot resolve symbol 'Glide'

I'm trying to use glide in Android Studio to deal with Gif animation from a resource stored in R.drawable but i get "cannot resolve sysmbol 'Glide'".

I've added glide to my dependencies in the builde.gradle

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'
}

and i'm using the following code to set the image view to the gif.

ImageView img=(ImageView)findViewById(R.id.catImg);
int resourceId = R.drawable.gangrycat;
Glide.with(this.context)
     .load(resourceId)
     .into(img);
like image 442
Elton Peake Avatar asked Oct 11 '16 20:10

Elton Peake


1 Answers

I solved this problem by removing dependency from builde.gradle and sync my project, then again add glide dependency to project builde.gradle and sync again.

like image 127
Reyhane Farshbaf Avatar answered Sep 27 '22 18:09

Reyhane Farshbaf