Someone please help me to fix this issue. Tried all possible solutions provided in Stack Overflow and other blogs. Errors:
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.facebook.android:facebook-android-sdk:4.26.0.
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download guava.jar (com.google.guava:guava:14.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download carousel.aar (com.azoft.carousellayoutmanager:carousel:1.2.1)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download twitter.aar (com.twitter.sdk.android:twitter:3.1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download tweet-ui.aar (com.twitter.sdk.android:tweet-ui:3.1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download numandroidcharts.aar (com.numetriclabz.numandroidcharts:numandroidcharts:1.0.2)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download library.aar (com.github.moondroid.coverflow:library:1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download android-image-cropper.aar (com.theartofdev.edmodo:android-image-cropper:2.3.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download circleindicator.aar (me.relex:circleindicator:1.2.2)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download tweet-composer.aar (com.twitter.sdk.android:tweet-composer:3.1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download twitter-core.aar (com.twitter.sdk.android:twitter-core:3.1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download twitter-text.jar (com.twitter:twitter-text:1.14.3)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.facebook.android:facebook-android-sdk:4.26.0.
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve net.sf.kxml:kxml2:2.3.0.
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download carousel.aar (com.azoft.carousellayoutmanager:carousel:1.2.1)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download twitter.aar (com.twitter.sdk.android:twitter:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download tweet-ui.aar (com.twitter.sdk.android:tweet-ui:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download numandroidcharts.aar (com.numetriclabz.numandroidcharts:numandroidcharts:1.0.2)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download library.aar (com.github.moondroid.coverflow:library:1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download android-image-cropper.aar (com.theartofdev.edmodo:android-image-cropper:2.3.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download circleindicator.aar (me.relex:circleindicator:1.2.2)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download guava.jar (com.google.guava:guava:14.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download tweet-composer.aar (com.twitter.sdk.android:tweet-composer:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download twitter-core.aar (com.twitter.sdk.android:twitter-core:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download twitter-text.jar (com.twitter:twitter-text:1.14.3)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.facebook.android:facebook-android-sdk:4.26.0.
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download guava.jar (com.google.guava:guava:14.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download carousel.aar (com.azoft.carousellayoutmanager:carousel:1.2.1)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download twitter.aar (com.twitter.sdk.android:twitter:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download tweet-ui.aar (com.twitter.sdk.android:tweet-ui:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download numandroidcharts.aar (com.numetriclabz.numandroidcharts:numandroidcharts:1.0.2)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download library.aar (com.github.moondroid.coverflow:library:1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download android-image-cropper.aar (com.theartofdev.edmodo:android-image-cropper:2.3.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download circleindicator.aar (me.relex:circleindicator:1.2.2)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download tweet-composer.aar (com.twitter.sdk.android:tweet-composer:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download twitter-core.aar (com.twitter.sdk.android:twitter-core:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download twitter-text.jar (com.twitter:twitter-text:1.14.3)
Someone please help me to fix this issue. Tried all possible solutions provided in Stack Overflow and other blogs. Errors:
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.facebook.android:facebook-android-sdk:4.26.0.
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download guava.jar (com.google.guava:guava:14.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download carousel.aar (com.azoft.carousellayoutmanager:carousel:1.2.1)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download twitter.aar (com.twitter.sdk.android:twitter:3.1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download tweet-ui.aar (com.twitter.sdk.android:tweet-ui:3.1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download numandroidcharts.aar (com.numetriclabz.numandroidcharts:numandroidcharts:1.0.2)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download library.aar (com.github.moondroid.coverflow:library:1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download android-image-cropper.aar (com.theartofdev.edmodo:android-image-cropper:2.3.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download circleindicator.aar (me.relex:circleindicator:1.2.2)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download tweet-composer.aar (com.twitter.sdk.android:tweet-composer:3.1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download twitter-core.aar (com.twitter.sdk.android:twitter-core:3.1.0)
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not download twitter-text.jar (com.twitter:twitter-text:1.14.3)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.facebook.android:facebook-android-sdk:4.26.0.
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve net.sf.kxml:kxml2:2.3.0.
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download carousel.aar (com.azoft.carousellayoutmanager:carousel:1.2.1)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download twitter.aar (com.twitter.sdk.android:twitter:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download tweet-ui.aar (com.twitter.sdk.android:tweet-ui:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download numandroidcharts.aar (com.numetriclabz.numandroidcharts:numandroidcharts:1.0.2)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download library.aar (com.github.moondroid.coverflow:library:1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download android-image-cropper.aar (com.theartofdev.edmodo:android-image-cropper:2.3.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download circleindicator.aar (me.relex:circleindicator:1.2.2)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download guava.jar (com.google.guava:guava:14.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download tweet-composer.aar (com.twitter.sdk.android:tweet-composer:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download twitter-core.aar (com.twitter.sdk.android:twitter-core:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not download twitter-text.jar (com.twitter:twitter-text:1.14.3)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.facebook.android:facebook-android-sdk:4.26.0.
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download guava.jar (com.google.guava:guava:14.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download carousel.aar (com.azoft.carousellayoutmanager:carousel:1.2.1)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download twitter.aar (com.twitter.sdk.android:twitter:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download tweet-ui.aar (com.twitter.sdk.android:tweet-ui:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download numandroidcharts.aar (com.numetriclabz.numandroidcharts:numandroidcharts:1.0.2)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download library.aar (com.github.moondroid.coverflow:library:1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download android-image-cropper.aar (com.theartofdev.edmodo:android-image-cropper:2.3.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download circleindicator.aar (me.relex:circleindicator:1.2.2)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download tweet-composer.aar (com.twitter.sdk.android:tweet-composer:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download twitter-core.aar (com.twitter.sdk.android:twitter-core:3.1.0)
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not download twitter-text.jar (com.twitter:twitter-text:1.14.3)
Some of workarounds which I have already tried: 1. To uncheck offline mode 2. Sdk update and changing target sdk and minimum sdk levels 3. gradle version and distribution(url) version should be same 4. Updated Android studio to latest version(3.5.3) and migrated all dependencies to androidx
my build gradle file:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.25.4'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://maven.java.net/content/groups/public/" }
maven { url "https://jitpack.io" }
maven {
url "https://s3.amazonaws.com/repo.commonsware.com"
}
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.android.packagename"
minSdkVersion 21
targetSdkVersion 28
multiDexEnabled true
versionCode 14
versionName "3.0.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//compile 'com.android.support:support-compat:25.3.1'
//compile 'com.facebook.android:facebook-android-sdk:4.+'
/* implementation('com.twitter.sdk.android:twitter:2.3.2@aar') {
transitive = true
}*/
implementation group: 'com.google.guava', name: 'guava', version: '14.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
//compile 'com.github.hani-momanii:SuperNova-Emoji:1.1'
// compile "me.leolin:ShortcutBadger:1.1.19@aar"
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
implementation 'androidx.mediarouter:mediarouter:1.0.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.numetriclabz.numandroidcharts:numandroidcharts:1.0.2'
implementation 'com.github.moondroid.coverflow:library:1.0'
implementation 'com.azoft.carousellayoutmanager:carousel:1.2.1'
//implementation 'com.facebook.android:facebook-android-sdk:4.22.1'
//implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
//implementation 'com.facebook.android:facebook-share:4.28.0'
//implementation 'com.facebook.android:facebook-login:5.0.0'
implementation 'com.facebook.android:facebook-android-sdk:4.26.0'
//implementation 'com.facebook.android:facebook-login:5.+'
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation 'com.squareup.okhttp3:okhttp:3.4.1'
implementation 'com.squareup.picasso:picasso:2.5.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.3.0'
implementation 'junit:junit:4.12'
implementation 'com.google.code.gson:gson:2.7'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.intuit.ssp:ssp-android:1.0.4'
implementation 'com.commonsware.cwac:provider:0.4.3'
implementation 'com.google.firebase:firebase-messaging:11.2.0'
implementation 'com.google.firebase:firebase-core:11.2.0'
implementation 'com.google.firebase:firebase-auth:11.2.0'
implementation 'com.google.android.gms:play-services-auth:11.2.0'
implementation 'com.google.android.gms:play-services-maps:11.2.0'
implementation 'com.google.android.gms:play-services-places:11.2.0'
implementation 'me.relex:circleindicator:1.2.2'
implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
//Twitter without using Fabrics
implementation 'com.twitter.sdk.android:twitter:3.1.0'
implementation 'com.twitter.sdk.android:twitter-core:3.1.0'
//rxjava
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.14'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
}
add jcenter()
also inside your repositories and then sync again
repositories {
jcenter()
}