android - io.fabric.tools 没有缓存版本列表 :gradle:1. + 可用于离线模式

标签 android windows android-studio crashlytics google-fabric

我开始使用 Fabric,我想安装 Crashlytics。按照说明,我已经在我的 Android 工作室中安装了 fabric 插件。

我收到这个错误:

错误:io.fabric.tools:gradle:1.+ 没有可用于离线模式的缓存版本列表。

插件对我的 gradle 进行了必要的更改,更改是:

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;
    }
}

正如此处的说明中所述: https://fabric.io/kits/android/crashlytics/install 我已经检查过,插件所做的更改是正确的。

我一直在搜索,我做了以下事情,但都没有奏效:

  • 重新安装插件
  • 取消选中gradle设置中的离线工作(我已经尝试过选中和未选中)
  • 清理项目
  • 重建项目

最佳答案

您在 Android Studio 中处于“离线模式”。要禁用此功能,请转到首选项 > Gradle 并取消选中“离线工作”

关于android - io.fabric.tools 没有缓存版本列表 :gradle:1. + 可用于离线模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45153719/

相关文章:

android - 将背景设置为空

java - 在桌面上按 Ctrl-右键单击触发一些操作(使用 JAVA)

android - 无法为 com.android.build.gradle.internal.dsl.BaseAppModuleExtension 类型的扩展 'url' 获取未知属性 'android'

Android Studio 创建示例游戏时出错

android - 等待进程出现在设备上超时

android - Android 是否支持慢动作视频播放?

android - SQLite 数据库最大存储容量

Android EditText边框背景色

objective-c - Windows 上的 Cocoa 编程

c# - 两个不同应用程序之间的通信