Error with the Android Studio Gradle

2

It's been a few days since I installed the version 2.3 of Android Studio that the projects do not compile me for Gradle , I've reinstalled several sometimes, even delete the hidden folders with a . in front, but everything remains the same.

  

Error, failure to solve ( \Prueba\app\build.gradle ):

junit:junit:4.12
javax.inject:javax.inject:1
javax.annotation:javax.annotation-api:1.2
com.google.code.findbugs:jsr305:2.0.1
org.hamcret:hamcrest-library:1.3
org.hamcrest:hamcrest-integration:1.3
com.squareup:javawriter:2.1.1

Code of build.gradle :

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.jonathan.prueba"
        minSdkVersion 15
        targetSdkVersion 25
        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(dir: 'libs', include: ['*.jar'])
    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:25.3.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}

Project build.gradle code:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.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
}

Current Project Image

    
asked by Jonathan Pescador 24.03.2017 в 18:38
source

1 answer

0

What the error shows:

Error, fallo al resolver (\Prueba\app\build.gradle):
junit:junit:4.12
javax.inject:javax.inject:1
javax.annotation:javax.annotation-api:1.2
com.google.code.findbugs:jsr305:2.0.1
org.hamcret:hamcrest-library:1.3
org.hamcrest:hamcrest-integration:1.3
com.squareup:javawriter:2.1.1

does not match what you show in your app\build.gradle file, it simply cleans the project files: Build > Clean Project

and synchronize the project with build.gradle files:

    
answered by 24.03.2017 в 21:19