Closed sunnymopada closed 7 years ago
@stephanenicolas Can you look into this?
It is either a proguard issue if okhttp is proguarded or an okhttp version issue.
Yes, I realised that. So i'm for time being I am proceeding with robopice-retrofit2 in below link until you update and release a new version
https://github.com/stephanenicolas/robospice/pull/459
Thank you :)
EDIT: Wow, it looks like I've failed to understand which module this question was related to (robospice-okhttp
or robospice-retrofit
). Pardon.
If you don't mind here's a little tip for @stephanenicolas on this issue. I looked into it a while ago. Error appears because Square developers have changed package names (not only this though but still) in their OkHttp library. Here are my changes from back than which address this issue: https://github.com/mykolaj/robospice/commit/d9009478cafa2b0a651aa3c3eaa58ea2e31ed358
@SanyasiraoM Still robospice-okhttp-module has to be recompiled after applying those changes. So it looks like you're out of luck for now.
@mykolaj So what should I do now to make it work? Any suggestion?
EDIT: Wow, it looks like I've failed to understand which module this question was related to (robospice-okhttp
or robospice-retrofit
). Pardon.
@SanyasiraoM // --- Good solution: I could create a pull request. Hopefully it will be merged some day and a new version of the module will be released.
// --- Not so good solution:
Meanwhile you could clone my fork of Robospice git clone https://github.com/mykolaj/robospice.git
. Switch to develop
branch where those fixes are introduced already git checkout develop
Install Apache Maven on your machine (consult a user's manual for your operating system to do that) and build Robospice yourself. To do this switch to Robospice project's root directory in your terminal and execute mvn install
command. Make sure you set ANDROID_HOME
environment variable properly, and have android SDK platform version 19 installed, and have Android emulator started. After everything is done you can find a file in $HOME/.m2/repository/com/octo/android/robospice/robospice-okhttp/1.4.14-unofficial/robospice-okhttp-1.4.14-unofficial.jar
Why is this solution "not so good"? Because when official version of the module will be released it could be implemented differently and could brake your code if you'd decide to use it. So use it on your own risk.
@mykolaj Somehow the jar file you have is working fine for me 👍
But I don't know how to handle errors, How to catch error codes and error json object. In retrofit one, The any exception except 200 used come in onFailure. But in retrofit2, All server errors coming to onSuccess only. How to handle them?
@mykolaj @stephanenicolas Can you look into this? Sorry to ping you guys.. But it's need of the hour for me
@SanyasiraoM Take a look on a discussion by following this link: https://github.com/mykolaj/Robospice-Retrofit2-sample/issues/1
@mykolaj Thank you. He and me are from same team 👍
@stephanenicolas Any idea when will you merge it?
Hi, In our project we are using com.octo.android.robospice:robospice-retrofit:1.4.14 , Which require okhttp: 1.6.0
And getstream java client
io.getstream.client:stream-repo-okhttp:1.2.2', Which require okhttp:2.2.0 So here gradle is picking up, 2.2.0 and Giving below error as that method is not available in 2.2.0
If I exclude 2.2.0 version from stream library.It's giving below as that method is not available in 1.6.0
I need to use both libraries.What should do now?, Thanks for your support