无法解决:com.squareup.retrofit2:converter-jaxb:2.3.0

时间:2018-03-13 11:00:16

标签: android gradle

我的gradle版本是4.2.1-all,我的gradle插件版本是3.0.1。

我的app模块build.gradle如下所示:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
    applicationId "com.example.demo"
    minSdkVersion 14
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

    //Retrofit
    implementation "com.squareup.retrofit2:retrofit:2.3.0"
    implementation "com.squareup.retrofit2:adapter-rxjava2:2.3.0"
    implementation "com.squareup.retrofit2:converter-jaxb:2.3.0"
    implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
}

当我单击带有Gradle文件的同步项目时,我得到的标题错误。有人可以帮帮我吗?

1 个答案:

答案 0 :(得分:0)

maven respository中搜索转换器jaxb,找不到它。 看github issue 2690,你就会知道原因!