英文:
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
ERROR
> Entry name 'javax/annotation/CheckReturnValue.java' collided
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论