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

Build error with Picasso Library #181

Open
SagarPanwala opened this issue Sep 19, 2015 · 17 comments
Open

Build error with Picasso Library #181

SagarPanwala opened this issue Sep 19, 2015 · 17 comments

Comments

@SagarPanwala
Copy link

I want to use this library, but I am unable to add that in my Xamarin Project. I want to use it with combination of Picasso package. But unable to use it. Please help me I stuck on this issue from past 2 days.

@Cheesebaron
Copy link
Contributor

If you get a build error, maybe you should share that exact error?

@JeroenMols
Copy link

I believe 'm getting the same error: a conflict between OkHttp in ModernHttpClient and in Picasso

My project setup is the following:

  • MyApp-Android
    • Reference to Picasso (2.5.2.0, Square.Picasso)
  • MyApp-iOS
  • MySharedLibrary
    • Reference to ModerHttpClient (2.4.2.0, ModernHttpClient)

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 1. Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/squareup/okhttp/Address;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:732)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:82)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:279)
at com.android.dx.command.dexer.Main.run(Main.java:245)
at com.android.dx.command.dexer.Main.main(Main.java:214)
at com.android.dx.command.Main.main(Main.java:106)

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lokio/AsyncTimeout$1;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
at com.android.dx.command.dexer.Main.processClass(Main.java:732)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:82)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:279)
at com.android.dx.command.dexer.Main.run(Main.java:245)
at com.android.dx.command.dexer.Main.main(Main.java:214)
at com.android.dx.command.Main.main(Main.java:106)
2 errors; aborting

Let me know if you need more info.

@lukax
Copy link

lukax commented Sep 25, 2015

experiencing same problems here

@Cheesebaron
Copy link
Contributor

OK, so both Picasso and ModernHttpClient should pull in OkHttp through a nuget, rather than both providing their own version of it.

For ModenHttpClient that is the case in new versions since August 24. For Picasso I have no idea. Talk to the author of Picasso to tell him to use the OkHttp nuget as well.

@JeroenMols
Copy link

Created a pull request for Picasso which should also solve this issue on Picasso side.

@SagarPanwala
Copy link
Author

Hey What do you mean by create a Pull Request? I just downloaded the binding from https://github.com/jacksierkstra/Picasso
But it is still not working. If this is not the way to download , please help me to use that.

@SagarPanwala
Copy link
Author

Hey After downloading the latest binding. I'm facing the new issue. Picasso is not loading images many times. I can't able to figure out at what time it fails. It throws error like

Java.Lang.NoClassDefFoundError was thrown

@SharpMobileCode
Copy link

Is this included in the latest release on Nuget? If not, any timeframe for that?

@Qonstrukt
Copy link

Would like to know the same, things have been awfully silent around ModernHttpClient lately.

@Cheesebaron
Copy link
Contributor

Looking at the tree for 2.4.2 and looking in the nuspec, you will see that the hard coded OkHttp dependency is still there. Hence it has not yet been released.

You can of course build from source.

@Jagadeesh-Govindaraj
Copy link

https://github.com/JoeMayo/LinqToTwitter/issues/59
https://github.com/jaymedavis/stripe.net/issues/500

please release new version i think this issue is fixed right now according this PR

@jzeferino
Copy link

@JeroenMols Did the Picasso PR was release yet?

@JeroenMols
Copy link

No idea, sorry

@jzeferino
Copy link

Can you link me the PR? I want to remind them of that! @JeroenMols

@JeroenMols
Copy link

jacksierkstra/Picasso#7

it was right above my comment btw :)

@jzeferino
Copy link

Thanks my friend. I've already remind the guys from square to fix it here: mattleibow/square-bindings#2

@samofwise
Copy link

@paulcbetts Thanks for making the changes so that ModernHttpClient could use OkHttp on nuget (seen in this commit).
But could you please release this new version on nuget??

andrewescutia pushed a commit to andrewescutia/ModernHttpClient that referenced this issue Jan 4, 2017
…ient to our nuget server (since the owner never updated theirs) that uses the nuget version of okhttp so that it plays nice with picasso. as noted here: anaisbetts#181
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

9 participants