在模块auto-value-1.2.jar

时间:2019-05-27 10:17:03

标签: java android build.gradle

我正在尝试运行1.5年的项目,遇到了很多错误,我已经更新了所有依赖项。

我遇到一些错误,女巫我什么都不知道

  在模块auto-value-1.2.jar(com.google.auto.value:auto-value:1.2)和auto-value-annotations-1.6.3模块中找到

重复的com.google.auto.value.AutoAnnotation类。 jar(com.google.auto.value:auto-value-annotations:1.6.3)   在模块auto-value-1.2.jar(com.google.auto.value:auto-value:1.2)和auto-value-annotations-1.6.3.jar(com)中找到重复的com.google.auto.value.AutoValue类.google.auto.value:自动值注释:1.6.3)   在模块auto-value-1.2.jar(com.google.auto.value:auto-value:1.2)和auto-value-annotations-1.6.3.jar中找到重复的com.google.auto.value.AutoValue $ Builder类。 (com.google.auto.value:自动值注释:1.6.3)   在模块commons-codec-1.3.jar(commons-codec:commons-codec:1.3)和org-apache-commons-codec.jar(org-apache-commons-codec)模块中找到重复的类org.apache.commons.codec.BinaryDecoder 。罐)   在模块commons-codec-1.3.jar(commons-codec:commons-codec:1.3)和org-apache-commons-codec.jar(org-apache-commons-codec)模块中找到重复的类org.apache.commons.codec.BinaryEncoder 。罐)   在commons-codec-1.3.jar(commons-codec:commons-codec:1.3)和

模块中找到了重复的org.apache.commons.codec.Decoder类

存在相同类型的错误,如果我不使用“ auto-value-annotations-1.6.3.jar”

下面是我的gradle文件

apply plugin: 'com.android.application'

android {

compileSdkVersion 28
defaultConfig {
    applicationId "***"
    minSdkVersion 16
    targetSdkVersion 28
    versionCode 107
    versionName "1.0"
    multiDexEnabled true
    javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }

}

buildTypes {
    debug {
        minifyEnabled false
        buildConfigField "int", "FOO", "42"
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

sourceSets {
    main {
        assets.srcDirs = ['src/main/assets', 'src/main/assets/font']
        res.srcDirs = ['src/main/res', 'src/main/res/values-de', 'src/main/res/values-sw720dp  ']
    }
}

dexOptions {
    preDexLibraries = false
    javaMaxHeapSize "8g"
}

useLibrary 'org.apache.http.legacy'

lintOptions {
    disable 'MissingTranslation'
    abortOnError false
}

dataBinding {
    enabled = true
}

packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'

    exclude 'project.properties'
    pickFirst 'META-INF/*'
    exclude 'org/apache/http/version.properties'
    exclude 'org/apache/http/client/version.properties'
}

}

configurations.all {
    resolutionStrategy.dependencySubstitution {
        substitute module('org.apache.commons:commons-io:1.3.2') with module('commons-io:commons-io:1.3.2')
    }
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    testImplementation 'junit:junit:4.12'
    implementation project(':ucrop')
    implementation project(':library')
    implementation project(':datePicker')
    implementation project(':cropImage')
    implementation project(':simplecropview')
    implementation files('libs/aspectjrt-1.7.3 (1).jar')
    implementation files('libs/isoparser-1.0.6.jar')
//support library
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation "com.android.support:design:27.1.0"
implementation "com.android.support:cardview-v7:27.1.0"
implementation "com.android.support:recyclerview-v7:27.1.0"

//for load HTML file
implementation project(':HtmlTextView')

//for web socket connection
implementation 'org.java-websocket:Java-WebSocket:1.3.0'

//for crashlytics
implementation 'net.hockeyapp.android:HockeySDK:4.0.2'

implementation 'de.greenrobot:eventbus:2.4.0'
implementation 'org.solovyev.android.views:linear-layout-manager:0.5@aar'

implementation 'com.daimajia.swipelayout:library:1.2.0@aar'

//for gallery
implementation 'com.octo.android.robospice:robospice:1.4.14'

//for audio recorder
implementation 'com.github.republicofgavin:pauseresumeaudiorecorder:1.0'

//for get api response
implementation 'com.loopj.android:android-async-http:1.4.9'

//for image load
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

//for pdf viewer
implementation 'com.github.barteksc:android-pdf-viewer:2.7.0-beta.1'

//for push notification
implementation "com.google.firebase:firebase-messaging:18.0.0"
implementation "com.google.android.gms:play-services-gcm:16.1.0"

//for speech memo
implementation 'com.google.cloud:google-cloud-speech:0.24.0-alpha'
testImplementation group: 'org.mortbay.jetty.alpn', name: 'alpn-boot', version: '8.1.0.v20141016'

implementation 'com.android.support:multidex:1.0.3'

annotationProcessor 'com.google.auto.value:auto-value:1.1'
}
apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:0)

尝试替换

annotationProcessor 'com.google.auto.value:auto-value:1.1'

使用

annotationProcessor 'com.google.auto.value:auto-value:1.6.3'
implementation 'com.google.auto.value:auto-value-annotations:1.6.3'