无法解决:okhttp loggin-interceptor

fra*_*gon 3 android gradle android-gradle-plugin retrofit okhttp

我正在使用Retrofit 2.0.0-beta2库与API进行通信.直到上周五,一切正常.今天我收到这个错误:

Failed to resolve: com.squareup.okhttp:logging-interceptor:2.6.0-SNAPSHOT
Run Code Online (Sandbox Code Playgroud)

我无法摆脱它.我在网上搜索,但似乎我的gradle文件没问题:

build.gradle(项目)

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url 'http://oss.sonatype.org/content/repositories/snapshots' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

build.gradle(app)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.package.app"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        //(...)
    }
}

dependencies {
    //(...)
    compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
    compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
    compile 'com.squareup.okhttp:okhttp:2.5.0'
    compile 'com.google.code.gson:gson:2.4'
    compile 'com.squareup.okhttp:logging-interceptor:2.6.0-SNAPSHOT'
}
Run Code Online (Sandbox Code Playgroud)

当我从依赖项中删除`compile'c​​om.squareup.okhttp:logging-interceptor:2.6.0-SNAPSHOT'时(这意味着我看不到Retrofit日志,但我确实希望看到它们)一切正常精细.任何人都知道如何解决它?

Mat*_*ini 5

logging-interceptor您可以在jCenter上看到今天更新到2.6.0

从中更改build.gradle

dependencies {
    ...
    compile 'com.squareup.okhttp:logging-interceptor:2.6.0-SNAPSHOT'
}
Run Code Online (Sandbox Code Playgroud)

至:

dependencies {
    ...
    compile 'com.squareup.okhttp:logging-interceptor:2.6.0'
}
Run Code Online (Sandbox Code Playgroud)