0

None of my .android dependencies are resolving.

examples:

Failed to resolve: com.android.support:appcompat-v7:28.1.0 Show in File Show in Project Structure dialog

Failed to resolve: com.android.support:support-v4:28.1.0 Show in File Show in Project Structure dialog

my gradle version is 4.6 and i just updated to the newest android studio version 3.2.1.

my project based gradle looks as follows:

buildscript {
    repositories {
        jcenter()
     mavenCentral()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.0.1'

    }
}

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

        google()
    }
}

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

and my app based gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        applicationId "com.example.sanchez.worldgramproject"
        minSdkVersion 21
        targetSdkVersion 28
        multiDexEnabled true
        versionCode 0
        versionName "0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.github.madrapps:pikolo:1.1.6'
    implementation 'com.android.support:design:28.1.0'
    implementation 'com.firebaseui:firebase-ui-database:4.2.0'
    implementation 'com.github.bumptech.glide:glide:3.8.0'
    implementation 'com.firebaseui:firebase-ui-storage:2.3.0'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'com.android.support:appcompat-v7:28.1.0'
    implementation 'com.android.support:cardview-v7:28.1.0'
    implementation 'com.android.support:recyclerview-v7:28.1.0'
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.android.support:support-v4:28.1.0'
    implementation 'com.android.support:exifinterface:28.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.firebase:firebase-auth:16.0.5'
    implementation 'com.google.firebase:firebase-database:16.0.4'
    implementation 'com.google.firebase:firebase-storage:16.0.4'
}

apply plugin: 'com.google.gms.google-services'
Ale4303
  • 429
  • 3
  • 10
  • 29
  • Possible duplicate of [Failed to resolve: recyclerview-v7](https://stackoverflow.com/questions/50891617/failed-to-resolve-recyclerview-v7) – Radesh Oct 27 '18 at 12:37

2 Answers2

0

change erroneous dependencies like this due to version miss match with buildTool change BuildTollVersion

 buildToolsVersion '28.1.3'

if it not work change

com.android.support:appcompat-v7:28.0.0
com.android.support:support-v4:28.0.0 

and u need to change all 28.1... versions to 28.0...

PushpikaWan
  • 2,437
  • 3
  • 14
  • 23
0

Remove buildToolsVersion '28.0.3' and use 28.0.0 for all support library.