Error: (26, 13) Failed to execute: com.android.support:appcompat-v7:25.0.1

Error: (26, 13) Failed to resolve: com.android.support:appcompat-v7:25.0.1
Error: (23, 24) Failed to resolve: com.android.support.test.espresso: espresso-core: 2.0

Here is my Gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.1"
    defaultConfig {
        applicationId "com.example.jignesh.myapplication"
        minSdkVersion 25
        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.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.0.1'
    testCompile 'junit:junit:4.12'
}
+6
source share
10 answers

In android studio, tools-> android-> sdk manager-> sdk tools-> update android support repository rev 41.

+1
source

Fixed problem with commenting out some lines in gradle

dependencies {

//    compile fileTree(dir: 'libs', include: ['*.jar'])

//    androidTestCompile('com.android.support.alert_dialog.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:design:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'

//    testCompile 'junit:junit:4.12'
}
+1
source

, , ... ,

 maven {
            url "https://maven.google.com"
        }

allprojects = > build.gradle

+1

maven gradle -

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

, : -)

+1

Espresso . -

androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'

, - Espresso Docs

0

build.gradle.

androidTestCompile ('com.android.support.test.espresso:espresso-contrib:2.2.2'){
    exclude module: 'support-annotations'
    exclude module: 'support-v4'
    exclude module: 'support-v13'
    exclude module: 'recyclerview-v7'
    exclude module: 'appcompat-v7'
}

.

configurations.all {
  resolutionStrategy {
      force 'com.android.support:support-annotations:23.0.1'
  }
}

, .

0

SDK SDK TOOL SDK

0

SDK → → → Android SDK

.

0

:

maven {
        url "https://maven.google.com"
    }

, , , , , , , activity.xml, .

-

tools == > == > == > android SDK == > SDK- Android, android 7.0 (Nougat).

android .

Android 2.2 , Android.

, .

0

:

compile 'com.android.support:appcompat-v7:25.+'
-2

Source: https://habr.com/ru/post/1679071/


All Articles