I am trying to use Retrofit in one of my projects. I encountered an error (new OkClient (new OkHttpClient ()))
RestAdapter adapter = new RestAdapter.Builder()
.setEndpoint(Constants.GET_API_URL_BASE)
.setLogLevel(RestAdapter.LogLevel.FULL)
.setClient(new OkClient(new OkHttpClient()))
.build();
apiGet = adapter.create(ApiCalls.class);
Error highlighted in red is on
(new OkHttpClient ())
* OkClient (com.squareup.okhttp.OkhttpClient) in OkClient cannot be applied to (okhttp3.OkhttpClient) *
These are my dependencies:
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'net.danlew:android.joda:2.7.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp3:okhttp:3.0.1'
Any idea ?.
Thanks
source
share