2016-03-22 30 views
1

には、Picassoを使用して複数の画像が作成されています。ピカソを使用した場合のjava.lang.NoSuchMethodError

Picasso.with(mContext) 
     .load(url) 
     .centerCrop() 
     .resize(imageView.getMeasuredWidth(),imageView.getMeasuredHeight()) 
     .error(R.drawable.detail_placeholder) 
     .placeholder(R.drawable.detail_placeholder) 
     .into(imageView); 

のように使用された場合でも、それは

java.lang.NoSuchMethodError: No virtual method load(Ljava/lang/String;)Lcom/squareup/picasso/RequestBuilder; in class Lcom/squareup/picasso/Picasso; or its super classes (declaration of 'com.squareup.picasso.Picasso' appears in /data/app/com.example.myapp-1/base.apk)

私は、このエラーを与えるすべてのヘルプは大歓迎されます。

+0

最新の 'compile 'com.squareup.picasso:picasso:2.5.2'' –

+0

@MD Eclipseを使用しています。 – Jas

+1

「Android Studio」でジャンプします。 –

答えて

0

それはあなたがイメージローダーで画像をロードしようとすることができない場合は、私は私のピカソのjarファイルのバージョン2.4.0

今私のアプリで
// "this" is the context here 
Picasso.with(this) 
     .load(personPhotoUrl) 
     .placeholder(R.drawable.avatar) 
     .error(R.drawable.avatar) 
     .into(mImageViewProfilePic); 

を、それを使用しています。このコードで試しますライブラリまたはギルド。

0

あなたのbuild.gradleにOkHttp依存関係を追加してみてください(アプリ・レベル):

compile 'com.squareup.okhttp:okhttp:+'

compile 'com.squareup.okhttp:okhttp-urlconnection:+'

編集:ああ、申し訳ありませんが、Eclipseを使用しているので、あなたが代わりにjarファイルを取得する必要がある場合があります

https://search.maven.org/remote_content?g=com.squareup.okhttp3&a=okhttp&v=LATEST

関連する問題