Fail after resolving Junit: Junit: 4.12 Gradle Android Studio

0

Good bye in advance I would like you to have the greatest understanding for me since I am new to using android stuido download version 2.3.3 since version 3.0.1 gave me a lot of problems and someone told me to download the 2.3.3 when I create a new project these errors appear to me

  

Appointment in block

Error: (37, 17) Failed to resolve: junit: junit: 4.12 Show in File
Show in Project Structure dialog

Error: Failed to resolve: com.squareup: javawriter: 2.2.1 Open File
Show in Project Structure dialog

Error: Failed to resolve: javax.inject: javax.inject: 1 Open File
Show in Project Structure dialog

Error: Failed to resolve: javax.annotation: javax.annotation-api: 1.2 Open File
Show in Project Structure dialog

Error: Failed to resolve: com.google.code.findbugs: jsr305: 2.0.1 Open File
Show in Project Structure dialog

Error: Failed to resolve: org.hamcrest: hamcrest-integration: 1.3 Open File
Show in Project Structure dialog

Error: Failed to resolve: com.squareup: javawriter: 2.1.1 Open File
Show in Project Structure dialog

And here is the configuration of my gradle I do not know how much you could help me

introducir el código aquí


    apply plugin: 'maven'
    buildscript {
    repositories {
    maven {
        url 'https://maven.google.com'
    }
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
    }


    dependencies {
    classpath 'com.android.tools.build:gradle:2.3.3'

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

      allprojects {
      repositories {
       maven {
        url 'https://maven.google.com'
           }
         jcenter()
          maven { 'url http://central.maven.org/maven2/' }
           // maven { url 
               "https://oss.sonatype.org/content/repositories/snapshots/" }
           }
         }
  

Appointment in block

And here the other configuration

introducir el código aquí

      apply plugin: 'com.android.application'

      android {
       compileSdkVersion 26
       buildToolsVersion "27.0.1"
       defaultConfig {
       applicationId "com.example.cdk.myapplication"
       minSdkVersion 19
       targetSdkVersion 26
       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'])
        compile group: 'com.squareup', name: 'javawriter', version: '2.2.1'
     compile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
 compile group: 'org.hamcrest', name: 'hamcrest-integration', version: '1.3'
 compile group: 'com.google.code.findbugs', name: 'jsr305', version: '2.0.1'
 compile group: 'javax.inject', name: 'javax.inject', version: '1'
 compile group: 'javax.annotation', name: 'javax.annotation-api', version: '1.2'
compile group: 'junit', name: 'junit', version: '4.12' */


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:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
  }

Keep in mind that the first dependencies are commented I put them because I thought it was missing those files but even so I fixed that problem so I commented to not delete them I do not know if it is the download server I still need try one. Many out there say it's the connection but my download speed is 1200 kbts / sec. In the gradle configuration, the offline work mode is unchecked and the recommended option is checked. I had previously tried the local mode and downloaded the latest version, but I generated more errors. Please help me I am trying to be as explicit as possible so that they take into account everything I have done please help me thank you in advance

  

Appointment in block

These are the errors that appear to me when I upgrade to version 3.0.1 according to the recommendation of someone from the forum

  

Appointment in block

Error: Unable to resolve dependency for ': app @ debug / compileClasspath': Could not resolve com.android.support:appcompat-v7:26.0.0-beta1. Open File Show Details

Error: Unable to resolve dependency for ': app @ debugAndroidTest / compileClasspath': Could not resolve com.android.support:appcompat-v7:26.0.0-beta1. Open File Show Details

Error: Unable to resolve dependency for ': app @ debugAndroidTest / compileClasspath': Could not resolve junit: junit: 4.12. Open File Show Details

Error: Unable to resolve dependency for ': app @ debugAndroidTest / compileClasspath': Could not resolve com.squareup: javawriter: 2.1.1. Open File Show Details

Error: Unable to resolve dependency for ': app @ debugAndroidTest / compileClasspath': Could not resolve javax.inject: javax.inject: 1. Open File Show Details

Error: Unable to resolve dependency for ': app @ debugAndroidTest / compileClasspath': Could not resolve org.hamcrest: hamcrest-library: 1.3. Open File Show Details

Error: Unable to resolve dependency for ': app @ debugAndroidTest / compileClasspath': Could not resolve com.google.code.findbugs: jsr305: 2.0.1. Open File Show Details

Error: Unable to resolve dependency for ': app @ releaseUnitTest / compileClasspath': Could not resolve junit: junit: 4.12. Open File Show Details

Error: Unable to resolve dependency for ': app @ releaseUnitTest / compileClasspath': Could not resolve com.android.support:appcompat-v7:26.0.0-beta1. Open File Show Details

    
asked by Jordys sosa 16.01.2018 в 00:28
source

0 answers