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

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

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

问题

  1. 我正在使用 Android Studio 4.0.1。当我尝试生成程序的 ***debug 版本*** 时,出现以下错误。(生成 **release 版本** 没有问题!)
  2. ***创建 Debug 版本***
  3. 错误:
  4. > 条目名称 'javax/annotation/CheckReturnValue.java' 冲突
  5. build.gradle 文件:
  6. apply plugin: 'com.android.application'
  7. apply plugin: 'com.google.gms.google-services'
  8. apply plugin: 'com.google.firebase.crashlytics'
  9. //apply plugin: 'com.google.firebase.firebase-perf'
  10. android {
  11. compileSdkVersion 28
  12. defaultConfig {
  13. applicationId "ai"
  14. minSdkVersion 19
  15. targetSdkVersion 28
  16. versionCode 6
  17. versionName "0.3.1"
  18. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  19. vectorDrawables.useSupportLibrary = true
  20. multiDexEnabled true
  21. }
  22. buildTypes {
  23. release {
  24. minifyEnabled false
  25. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  26. }
  27. debug {
  28. applicationIdSuffix '.dev'
  29. }
  30. }
  31. dataBinding {
  32. enabled = true
  33. }
  34. }
  35. dependencies {
  36. implementation fileTree(dir: 'libs', include: ['*.jar'])
  37. implementation 'androidx.appcompat:appcompat:1.0.0'
  38. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  39. implementation 'com.google.android.material:material:1.0.0'
  40. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  41. implementation 'com.android.support:multidex:1.0.3'
  42. testImplementation 'junit:junit:4.12'
  43. androidTestImplementation 'androidx.test:runner:1.1.0'
  44. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
  45. implementation 'androidx.cardview:cardview:1.0.0'
  46. implementation 'com.kailashdabhi:om-recorder:1.1.5'
  47. implementation 'com.fxn769:musicwave:1.0'
  48. implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:4.1.2'
  49. // implementation "androidx.viewpager2:viewpager2:1.0.0"
  50. //firebase
  51. implementation 'com.google.firebase:firebase-analytics:17.5.0'
  52. implementation 'com.google.firebase:firebase-crashlytics:17.2.1'
  53. implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
  54. implementation 'com.google.firebase:firebase-messaging:20.2.4'
  55. // implementation 'com.google.firebase:firebase-perf:19.0.5'
  56. implementation 'com.squareup.picasso:picasso:2.71828'
  57. implementation 'com.github.GrenderG:Toasty:1.4.1'
  58. implementation 'com.squareup.retrofit2:retrofit:2.4.0'
  59. implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
  60. implementation 'com.squareup.okhttp3:okhttp:3.10.0'
  61. implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.2.0'
  62. implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
  63. implementation 'com.github.amirdew:JSON:v1.0.0'
  64. implementation 'com.github.clans:fab:1.6.4'
  65. implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
  66. implementation 'com.facebook.stetho:stetho:1.5.0'
  67. implementation 'com.github.ohoussein.playpauseview:playpauseview:1.0.2'
  68. implementation 'com.nabinbhandari.android:permissions:3.7'
  69. implementation 'com.job:droidnet:2.0.0'
  70. implementation 'com.daimajia.easing:library:2.0@aar'
  71. implementation 'com.daimajia.androidanimations:library:2.3@aar'
  72. implementation 'com.getkeepsafe.taptargetview:taptargetview:1.13.0'
  73. }
英文:

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

  1. apply plugin: 'com.android.application'
  2. apply plugin: 'com.google.gms.google-services'
  3. apply plugin: 'com.google.firebase.crashlytics'
  4. //apply plugin: 'com.google.firebase.firebase-perf'
  5. android {
  6. compileSdkVersion 28
  7. defaultConfig {
  8. applicationId "ai"
  9. minSdkVersion 19
  10. targetSdkVersion 28
  11. versionCode 6
  12. versionName "0.3.1"
  13. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  14. vectorDrawables.useSupportLibrary = true
  15. multiDexEnabled true
  16. }
  17. buildTypes {
  18. release {
  19. minifyEnabled false
  20. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  21. }
  22. debug {
  23. applicationIdSuffix '.dev'
  24. }
  25. }
  26. dataBinding {
  27. enabled = true
  28. }
  29. }
  30. dependencies {
  31. implementation fileTree(dir: 'libs', include: ['*.jar'])
  32. implementation 'androidx.appcompat:appcompat:1.0.0'
  33. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  34. implementation 'com.google.android.material:material:1.0.0'
  35. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  36. implementation 'com.android.support:multidex:1.0.3'
  37. testImplementation 'junit:junit:4.12'
  38. androidTestImplementation 'androidx.test:runner:1.1.0'
  39. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
  40. implementation 'androidx.cardview:cardview:1.0.0'
  41. implementation 'com.kailashdabhi:om-recorder:1.1.5'
  42. implementation 'com.fxn769:musicwave:1.0'
  43. implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:4.1.2'
  44. // implementation "androidx.viewpager2:viewpager2:1.0.0"
  45. //firebase
  46. implementation 'com.google.firebase:firebase-analytics:17.5.0'
  47. implementation 'com.google.firebase:firebase-crashlytics:17.2.1'
  48. implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
  49. implementation 'com.google.firebase:firebase-messaging:20.2.4'
  50. // implementation 'com.google.firebase:firebase-perf:19.0.5'
  51. implementation 'com.squareup.picasso:picasso:2.71828'
  52. implementation 'com.github.GrenderG:Toasty:1.4.1'
  53. implementation 'com.squareup.retrofit2:retrofit:2.4.0'
  54. implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
  55. implementation 'com.squareup.okhttp3:okhttp:3.10.0'
  56. implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.2.0'
  57. implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1'
  58. implementation 'com.github.amirdew:JSON:v1.0.0'
  59. implementation 'com.github.clans:fab:1.6.4'
  60. implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
  61. implementation 'com.facebook.stetho:stetho:1.5.0'
  62. implementation 'com.github.ohoussein.playpauseview:playpauseview:1.0.2'
  63. implementation 'com.nabinbhandari.android:permissions:3.7'
  64. implementation 'com.job:droidnet:2.0.0'
  65. implementation 'com.daimajia.easing:library:2.0@aar'
  66. implementation 'com.daimajia.androidanimations:library:2.3@aar'
  67. implementation 'com.getkeepsafe.taptargetview:taptargetview:1.13.0'
  68. }

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:

确定