Failed to solve: com.android.support:support-fragment:26.1.0

Mark my question with this question link , but the question is not like this question. The reason is "com.android.support:support-fragment:26.1.0" was not added to my project. The question has a different reason and another error. Also the answer to Question Link does not work for this problem.

I am using Android Studio 2.3.3 and Android Studio 3.0 BETA 6 side by side in my computer. In my project, I get an error as shown below:

enter image description here

I use dependencies -

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:26.+'
    compile 'com.android.support:design:26.+'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.android.support:recyclerview-v7:26.+'
    compile 'com.android.support:cardview-v7:26.+'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.facebook.android:account-kit-sdk:4.+'
    compile 'com.karumi:dexter:4.1.1'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
    compile 'com.wdullaer:materialdatetimepicker:2.3.0'
    compile 'com.jakewharton:butterknife:8.7.0'
    compile 'com.flaviofaria:kenburnsview:1.0.7'
    compile 'com.google.firebase:firebase-core:11.2.0'
    compile 'com.google.firebase:firebase-database:11.2.0'
    compile 'com.google.android.gms:play-services:11.2.0'
    compile 'com.android.support:multidex:1.0.1'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
}
apply plugin: 'com.google.gms.google-services'

and use -

compileSdkVersion 26 buildToolsVersion "26.0.0"

in gradle file i use this code -

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'com.google.gms:google-services:3.1.0'
        classpath 'com.google.firebase:firebase-plugins:1.0.4'
    }
}

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

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

I am stuck to find this solution to the problem.

+4
source share
1

maven { url 'https://maven.google.com' } repositories .

buildscript {
repositories {
    jcenter()
    maven { url 'https://maven.google.com' }
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.3.3'
    classpath 'com.google.gms:google-services:3.0.0'
 }
}
+8

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


All Articles