Hi I am trying to use the https://github.com/Swati4star/Images-to-PDF ImagesToPDF function from this library. I have added all the classes required in my application.
Now I have used picasso in my application before adding the ImagesToPDF function.
Now after adding it I am getting following 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.example.onboardingversion2-sJCkixxNOR2KPNLmYYdvpQ==/base.apk!classes2.dex)
Getting error in following function :
/**
* Opens Matisse activity to select Images
*/
private void selectImages() {
Matisse.from(this)
.choose(MimeType.ofImage(), false)
.countable(true)
.capture(true)
.captureStrategy(new CaptureStrategy(true, AUTHORITY_APP))
.maxSelectable(1000)
.imageEngine(new PicassoEngine())
.forResult(INTENT_REQUEST_GET_IMAGES);
}
app gets crashed and gives error. I added application and set Multidex
public class MyApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(base);
}
}
I also added multidexEnabled true in gradle. Still its throwing the error. Please help. Thank you.
Picasso in not updated for about 4 years, it has many issues. Maybe You should switch to Glide