Search code examples
androidwindowsandroid-studiocrashlyticsgoogle-fabric

No cached version listing for io.fabric.tools:gradle:1.+ available for offline mode


I am starting to use Fabric and I want to install Crashlytics. As it is in the instructions I have installed fabric plugin on my Android studio.

I get this error:

Error:No cached version listing for io.fabric.tools:gradle:1.+ available for offline mode.

the plugin does the required changes to my gradle and the changes are:

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}


android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.me.myapplication"
        minSdkVersion 15
        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'
        }
    }
}


buildscript {
    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }

    repositories {
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
    }
}

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.orhanobut:hawk:2.0.1'
    compile 'com.koushikdutta.ion:ion:2.1.9'
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.android.support:design:25.1.0'
    compile 'com.android.support:recyclerview-v7:25.1.0'
    compile 'com.android.support:cardview-v7:25.1.0'
    compile 'com.android.support:support-v4:25.1.0'
    compile 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
    compile 'com.mohamadamin:persianmaterialdatetimepicker:1.2.1'
    compile 'com.tuyenmonkey:mkloader:1.2.0'

    compile 'com.jaredrummler:material-spinner:1.1.0'
    compile 'com.github.clans:fab:1.6.4'

    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.github.sd6352051.niftydialogeffects:niftydialogeffects:1.0.0@aar'
    compile 'com.github.aakira:expandable-layout:1.6.0@aar'


    testCompile 'junit:junit:4.12'
    compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
        transitive = true;
    }
}

As it is in the instruction in here: https://fabric.io/kits/android/crashlytics/install I have checked and the changes that the plugin made is right.

I've been searching and I have done the following things and none has worked:

  • reinstall the plugin
  • uncheck the offline work in gradle setting (I have tried both checked and unchecked)
  • clean project
  • rebuilt project

Solution

  • The problem was the proxy settings. It was not working rightly.