Entry name ‘javax/annotation/CheckReturnValue.java’ collided Generate Debug apk

huangapple go评论74阅读模式
英文:

Entry name 'javax/annotation/CheckReturnValue.java' collided Generate Debug apk

问题

我正在使用 Android Studio 4.0.1。当我尝试生成程序的 ***debug 版本*** 时,出现以下错误。(生成 **release 版本** 没有问题!)

***创建 Debug 版本***

错误:
> 条目名称 'javax/annotation/CheckReturnValue.java' 冲突

build.gradle 文件:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
//apply plugin: 'com.google.firebase.firebase-perf'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "ai"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 6
        versionName "0.3.1"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            applicationIdSuffix '.dev'
        }
    }
    dataBinding {
        enabled = true
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.android.support:multidex:1.0.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.kailashdabhi:om-recorder:1.1.5'
    implementation 'com.fxn769:musicwave:1.0'
    implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:4.1.2'
//    implementation "androidx.viewpager2:viewpager2:1.0.0"

    //firebase
    implementation 'com.google.firebase:firebase-analytics:17.5.0'
    implementation 'com.google.firebase:firebase-crashlytics:17.2.1'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    implementation 'com.google.firebase:firebase-messaging:20.2.4'
//    implementation 'com.google.firebase:firebase-perf:19.0.5'

    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.GrenderG:Toasty:1.4.1'
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.2.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
    implementation 'com.github.amirdew:JSON:v1.0.0'
    implementation 'com.github.clans:fab:1.6.4'

    implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
    implementation 'com.facebook.stetho:stetho:1.5.0'

    implementation 'com.github.ohoussein.playpauseview:playpauseview:1.0.2'
    implementation 'com.nabinbhandari.android:permissions:3.7'

    implementation 'com.job:droidnet:2.0.0'
    implementation 'com.daimajia.easing:library:2.0@aar'
    implementation 'com.daimajia.androidanimations:library:2.3@aar'

    implementation 'com.getkeepsafe.taptargetview:taptargetview:1.13.0'
}
英文:

I am using Android Studio 4.0.1. The following error occurs when I try to produce a debug version of the program. (No problem to produce a release version!)

Create Debug Version

Entry name ‘javax/annotation/CheckReturnValue.java’ collided Generate Debug apk

ERROR
> Entry name 'javax/annotation/CheckReturnValue.java' collided

Entry name ‘javax/annotation/CheckReturnValue.java’ collided Generate Debug apk

build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
//apply plugin: 'com.google.firebase.firebase-perf'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "ai"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 6
        versionName "0.3.1"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            applicationIdSuffix '.dev'
        }
    }
    dataBinding {
        enabled = true
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.android.support:multidex:1.0.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.kailashdabhi:om-recorder:1.1.5'
    implementation 'com.fxn769:musicwave:1.0'
    implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:4.1.2'
//    implementation "androidx.viewpager2:viewpager2:1.0.0"

    //firebase
    implementation 'com.google.firebase:firebase-analytics:17.5.0'
    implementation 'com.google.firebase:firebase-crashlytics:17.2.1'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    implementation 'com.google.firebase:firebase-messaging:20.2.4'
//    implementation 'com.google.firebase:firebase-perf:19.0.5'

    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.GrenderG:Toasty:1.4.1'
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.2.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
    implementation 'com.github.amirdew:JSON:v1.0.0'
    implementation 'com.github.clans:fab:1.6.4'

    implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
    implementation 'com.facebook.stetho:stetho:1.5.0'


    implementation 'com.github.ohoussein.playpauseview:playpauseview:1.0.2'
    implementation 'com.nabinbhandari.android:permissions:3.7'

    implementation 'com.job:droidnet:2.0.0'
    implementation 'com.daimajia.easing:library:2.0@aar'
    implementation 'com.daimajia.androidanimations:library:2.3@aar'

    implementation 'com.getkeepsafe.taptargetview:taptargetview:1.13.0'

}

I cleaned the project and even rebuild it but the problem remains.

答案1

得分: 4

删除 debug 文件夹中现有的 APK,然后重新构建 APK 应该会起效。

英文:

Deleting the existing apk from the debug folder and rebuilding the apk should work.

huangapple
  • 本文由 发表于 2020年9月16日 22:15:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/63921979.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定