title: java.lang.NoClassDefFoundError: com.squareup.okhttp.OkHttpClient
body: <p>I've read this question <a href="https://stackoverflow.com/questions/28124587/android-http-connecting-with-okhttp-dont-work">Android http connecting with OkHttp Dont work</a> and <a href="https://stackoverflow.com/questions/35578135/noclassdeffounderror-for-okhttpclient">NoClassDefFoundError for OkHttpClient</a> but it hasn't solved my problem . Still am facing  <code>java.lang.NoClassDefFoundError: com.squareup.okhttp.OkHttpClient</code> this error , i have added both <code>okhttp-3.4.1.jar</code> and <code>okio-1.10.0.jar</code>, also i have tried to add OkHttp  dependency <code>compile 'com.squareup.okhttp3:okhttp:3.4.1'</code> but my Android Studio says that it cannot Resolve it. so ma really stuck what can i do for this. Am using <strong>Android Studio Version 1.5.1</strong></p>
  
  <p>Below is my error in the logcat </p>
  
  <pre><code>09/pixsor.app.huzykamz.pixoradmin E/AndroidRuntime: FATAL EXCEPTION: main
  Process: pixsor.app.huzykamz.pixoradmin, PID: 14209
  java.lang.NoClassDefFoundError: com.squareup.okhttp.OkHttpClient
  at com.squareup.picasso.OkHttpDownloader.defaultOkHttpClient(OkHttpDownloader.java:31)
  at com.squareup.picasso.OkHttpDownloader.&lt;init&gt;(OkHttpDownloader.java:76)
  at com.squareup.picasso.OkHttpDownloader.&lt;init&gt;(OkHttpDownloader.java:65)
  at pixsor.app.huzykamz.pixoradmin.PixorAdmin.onCreate(PixorAdmin.java:21)
  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328)
  at android.app.ActivityThread.access$1500(ActivityThread.java:135)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:136)
  at android.app.ActivityThread.main(ActivityThread.java:5001)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:515)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>The Error is brought on this line;</p>
  
  <pre><code>builder.downloader(new OkHttpDownloader(this,Integer.MAX_VALUE));
  </code></pre>
  
  <p>In this code Below;</p>
  
  <pre><code> FirebaseDatabase.getInstance().setPersistenceEnabled(true);
              Picasso.Builder builder = new Picasso.Builder(this);
              builder.downloader(new OkHttpDownloader(this,Integer.MAX_VALUE));
              Picasso built = builder.build();
              built.setIndicatorsEnabled(false);
              built.setLoggingEnabled(true);
              Picasso.setSingletonInstance(built);
  </code></pre>
  
  <p>This is my gradle File.</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.1"
  
      defaultConfig {
       //   vectorDrawables.useSupportLibrary = true
          applicationId "pixsor.app.huzykamz.pixoradmin"
          minSdkVersion 16
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
  
         // multiDexEnabled true
      }
      buildTypes {
          release {
             // minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  
  
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.4.0'
      compile 'com.android.support:design:23.4.0'
      compile 'com.google.firebase:firebase-core:9.4.0'
      compile 'com.google.firebase:firebase-database:9.4.0'
      compile 'com.google.firebase:firebase-crash:9.4.0'
      compile 'com.google.firebase:firebase-auth:9.4.0'
      compile 'com.google.firebase:firebase-storage:9.4.0'
      compile 'com.android.support:cardview-v7:23.0.+'
      compile 'com.android.support:recyclerview-v7:23.0.+'
      compile 'com.firebaseui:firebase-ui:0.4.3'
  
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>When i try to add an OkHttp dependency this is what happens
  <a href="https://i.stack.imgur.com/06gKu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/06gKu.png" alt="enter image description here"></a></p>
  
  <p>So please help me out ...</p>