title: Android Studio gradle error: package com.google.gson.[different libraries] does not exist
body: <p>I get the 110 errors when Gradle is building the app.</p>
  
  <pre><code>Error:(91, 23) error: package com.google.gson does not exist
  Error:(94, 31) error: package com.google.gson.reflect does not exist  
  Error:(94, 31) error: package com.google.gson.... does not exist
  ...
  </code></pre>
  
  <p>It then tells me that this comes from the imports at my different activities, for example:</p>
  
  <pre><code>import com.google.gson.Gson;
  import com.google.gson.reflect.TypeToken;
  </code></pre>
  
  <p>This is in my build.gradle which worked perfectly before the Studio update:</p>
  
  <pre><code>android {
    compileSdkVersion 23
    buildToolsVersion '23.0.3'
  
    defaultConfig {
      applicationId "xxxx.xxx"
      minSdkVersion 16
      targetSdkVersion 23
      versionCode #
      versionName "#.#"
    }
  
    buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
    }
  }
  dependencies {
     //...
     compile files('C:/Users/Kaspar/StudioProjects/maakler.ee-app/libs/gson-2.7-sources.jar')
  }
  </code></pre>
  
  <p>I also tried these versions which all gave the same result</p>
  
  <pre><code>compile fileTree(dir: 'libs', include: 'gson-2.7-sources.jar')
  compile files('libs/gson-2.2.4-sources.jar')
  </code></pre>
  
  <p>The IDE does not give any warnings when I write the code. It only throws the error on Gradle build.</p>
  
  <p>This all started after Android Studio update and I have no idea how to get this to work.</p>