M B
M B

Reputation: 323

Failed to resolve: com.android.support:support-v4:28.0.0-rc01

I keeping getting these issues once I synced my gradle file. My gradle file looks like this.

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.calcounter.whattappclone"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
        implementation 'com.android.support:design:28.0.0-rc02'
        implementation 'com.andriod.support:support-v4:28.0.0-rc01'
        implementation 'com.android.support.constraint:constraint-layout:1.1.2'
        implementation 'com.google.firebase:firebase-auth:11.8.0'
        implementation 'com.google.firebase:firebase-storage:11.8.0'
        implementation 'com.google.firebase:firebase-database:11.8.0'
        // FirebaseUI for Firebase Realtime Database
        implementation 'com.firebaseui:firebase-ui-database:3.2.2'
       implementation 'com.andriod.support:support-v4:27.0.0-rc01'
        implementation 'de.hdodenhof:circleimageview:2.2.0'
        implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
        implementation 'com.squareup.picasso:picasso:2.71828'
        testImplementation 'junit:junit:4.12'

        //implementation 'com.android.support:support-annotations:27.1.1'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    }

**here is my gradle.project file that i have been using, still errors occur, i have tried changing the dependencies but still same error occurs

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {

        classpath 'com.android.tools.build:gradle:3.2.1'

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

        classpath 'com.google.gms:google-services:3.2.0'


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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

Any solutions this? please

Upvotes: 0

Views: 13786

Answers (2)

Anthony Mullen
Anthony Mullen

Reputation: 25

I had a similar problem. It turned out that I had 'Offline work' ticked in settings and this was stopping Android studio going to the internet for dependencies. I did not have the required dependencies on local repo so 'Unable to resolve..' kept happening. Turning it off solved problem. This is pretty obvious when I thought about it but it caught me out.

Upvotes: 0

ʍѳђઽ૯ท
ʍѳђઽ૯ท

Reputation: 16976

Use the same version and the latest stable version for:

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.andriod.support:support-v4:28.0.0'

And remove the duplicate (support-v4) one. Update your gradle in your root build.gradle too:

classpath 'com.android.tools.build:gradle:3.2.1'

Upvotes: 3

Related Questions