Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoSuchMethodError #85

Open
death14stroke opened this issue May 14, 2019 · 1 comment
Open

java.lang.NoSuchMethodError #85

death14stroke opened this issue May 14, 2019 · 1 comment

Comments

@death14stroke
Copy link

I use Picasso loader with this library. Here is my code:

ScrollGalleryView galleryView = ScrollGalleryView
.from(root.findViewById(R.id.galleryView))
.settings(GallerySettings
.from(getFragmentManager())
.thumbnailSize(100)
.enableZoom(true)
.build()
)
.add(image("http://pirate-islands.com/wp-content/uploads/2018/07/07_Dom-Fernando-II_01-636x310.jpg"))
.build();

When I run this code, I get this error:

java.lang.NoSuchMethodError: No static method with(Landroid/content/Context;)Lcom/squareup/picasso/Picasso; in class Lcom/squareup/picasso/Picasso; or its super classes (declaration of 'com.squareup.picasso.Picasso' appears in /data/app/com.andruid.magic.quotedaily-clyNaxcsRYwsWDlj4JlNIg==/split_lib_dependencies_apk.apk)
at com.veinhorn.scrollgalleryview.loader.picasso.PicassoImageLoader.loadThumbnail(PicassoImageLoader.java:44)
at com.veinhorn.scrollgalleryview.ScrollGalleryView.addMedia(ScrollGalleryView.java:223)
at com.veinhorn.scrollgalleryview.builder.GalleryBuilderImpl.build(GalleryBuilderImpl.java:73)
at com.andruid.magic.quotedaily.LikedFragment.readImages(LikedFragment.java:80)

I have added import statement:
import static com.veinhorn.scrollgalleryview.loader.picasso.dsl.DSL.*;

This is in my gradle file (Module):

implementation 'com.veinhorn.scrollgalleryview:library:1.2.8'
implementation 'com.veinhorn.scrollgalleryview:picasso-loader:1.2.8'

@mojtaba-yekta
Copy link

I've got the same error but on glide-loader.
the glide version I used was the latest version 4.9.0 but glide-loader uses 4.8.0 version. so I changed glide version to 4.8.0 in my app gradle and problem solved.

I checked picasso-loader and it uses 2.5.2 version
probably you should change your app gradle like below:

//change this
implementation 'com.squareup.picasso:picasso:2.71828'
//to this
implementation 'com.squareup.picasso:picasso:2.5.2'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants