Q:

Cannot Import GSON/JSON in Android Studio Using Maven

I'm having a problem importing com.google.gson using Maven. Right now, I'm getting the following errors:
Error:(24, 17) Failed to resolve: junit:junit:4.12

and 
Error:(22, 13) Failed to resolve: com.google.code.gson:gson:2.5

Here is the build.gradle for the Project:
buildscript {
    repositories {
        jcenter()
        maven { url 'http://repo1.maven.org/maven2' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

repositories {
    jcenter()
    mavenCentral()
}

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

and here is the build.gradle for the "Module: App":
apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.name.testversion"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile 'com.google.code.gson:gson:2.5'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.google.android.gms:play-services:8.3.0'
}

Please tell me what to do to fix these problems and successfully import "com.google.code.gson:gson:2.5" into Android Studio to use with this project.
Also, just so you know, I'm newer to Android Studio, just to put that into perspective, and this is my first time using Maven in Android Studio, but not first time using Maven in general.

A:

Change your project gradle to this one 
//Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
        maven { url 'http://repo1.maven.org/maven2' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

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

