I am working on android studio and fetching some data from the web. I tried using OkHttpClient and also added jars to my project folder but still i am unable t
OkHttpClient
android { compileSdkVersion 25 buildToolsVersion '25.0.2' useLibrary 'org.apache.http.legacy' ... } dependencies { ... compile 'com.squareup.okhttp3:okhttp:3.4.1' }
And change your import from com.squareup.okhttp.OkHttpClient to
com.squareup.okhttp.OkHttpClient
import okhttp3.OkHttpClient;