I'm working on news android project using RSS feed, my app now can get title, description, time of news perfectly but one it come to image it shows me the following error:
Cannot resolve symbol 'PicassoClient'
this my code :
public class MyAdapter extends RecyclerView.Adapter<MyViewHolder> {
Context c;
ArrayList<Article> articles;
public MyAdapter(Context c, ArrayList<Article> articles) {
this.c = c;
this.articles = articles;
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v= LayoutInflater.from(c).inflate(R.layout.model,parent,false);
return new MyViewHolder(v);
}
@Override
public void onBindViewHolder(MyViewHolder holder, int position) {
Article article=articles.get(position);
String title=article.getTitle();
String desc=article.getDescription();
String date=article.getDate();
String imageUrl=article.getImageUrl().replace("localhost","10.0.2.2");
holder.titleTxt.setText(title);
holder.desctxt.setText(desc.substring(0,130));
holder.dateTxt.setText(date);
PicassoClient.downloadImage(c,imageUrl,holder.img);
}
@Override
public int getItemCount() {
return articles.size();
}
}
this is my dependencies:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
}
What I have tried:
compile 'com.squareup.picasso:picasso:2.5.0 version
I don't know what to do !!