Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoSuchMethodError if i am using okhttp 2.0 and the latest retrofit?

Could not find method com.squareup.okhttp.OkHttpClient.open, referenced from method retrofit.client.OkClient.openConnection.

below is my gradle config

compile 'com.squareup.okhttp:okhttp:+'
compile 'com.squareup.okhttp:okhttp-urlconnection:+'
compile 'com.squareup.retrofit:retrofit:+'
like image 558
Shawn Thye Avatar asked May 27 '14 15:05

Shawn Thye


1 Answers

Ok, square has released 2.0 RC2 on github, but not on maven:

https://github.com/square/okhttp

But you still need okhttp-urlconnection (RC1 right now) which is only on maven:

http://mvnrepository.com/artifact/com.squareup.okhttp

And don't forget okhttp 2.0 is now dependent on okio:

https://github.com/square/okio

like image 62
Kyle Jahnke Avatar answered Oct 07 '22 13:10

Kyle Jahnke