I have big troubles using the gson library. When building the project i get:

> 
> "Cannot resolve symbol gson"
> 
> 
> 

I have googled for hours but no solution seems to work. Here is my build.gradle file:

```
android {
    compileSdkVersion 24
    buildToolsVersion "28.0.2"
    defaultConfig {
        applicationId "com.example.jasminkrhan.vaktija"
        minSdkVersion 24
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'
compile 'com.google.code.gson:gson:2.8.2'

}

```

And also my build.gradle file for the project:

```
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        jcenter {
            url "http://jcenter.bintray.com/"
        }
    }

    repositories {
        maven  {
            url "http://repo1.maven.org/maven2"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {

    repositories {
        jcenter {
            url "http://jcenter.bintray.com/"
        }
    }

    repositories {
        maven  {
            url "http://repo1.maven.org/maven2"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

```

Does someone see something wrong with my code? Why does not android studio find the library? I have already tried to restart Android Studio but that doesn't help.