重复的类 com.mapbox.mapboxsdk.plugins.annotation.Annotation 在模块 classes.jar 中找到。

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

Duplicate class com.mapbox.mapboxsdk.plugins.annotation.Annotation found in modules classes.jar

问题

以下是您提供的内容的翻译:

我的Flutter应用在使用Mapbox时表现得非常好,但突然出现了问题,我没有做任何更改。现在每次尝试运行应用程序时都会出现以下错误:

  1. 在模块 classes.jarcom.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v8:0.7.0)和 classes.jarcom.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.8.0)中发现重复的类 com.mapbox.mapboxsdk.plugins.annotation.Annotation

以下是我 pubspec.yaml 中的依赖项:

  1. dependencies:
  2. flutter:
  3. sdk: flutter
  4. flutter_localizations:
  5. sdk: flutter
  6. flag: ^1.0.3
  7. shared_preferences: ^0.5.6+3
  8. provider: ^4.0.4
  9. intro_views_flutter: ^2.8.1
  10. lottie: ^0.6.0
  11. mapbox_gl: ^0.8.0
  12. location: ^3.0.2
  13. loading: ^1.0.2
  14. autocomplete_textfield: ^1.7.3
  15. flip_card: ^0.4.4
  16. animate_do: ^1.6.3
  17. highlighter_coachmark: ^0.0.3
  18. firebase_database: ^3.1.3
  19. sqflite: ^1.3.0
  20. loading_overlay: ^0.2.1
  21. flutter_spinkit: ^4.1.2+1
  22. google_fonts: ^0.4.0
  23. intl: ^0.16.0
  24. firebase_auth: ^0.16.0
  25. google_sign_in: ^4.4.1
  26. flutter_facebook_login: ^3.0.0
  27. flutter_auth_buttons: ^0.8.0
  28. steps: ^0.0.1
  29. background_location: ^0.0.9+3
  30. flutter_mapbox_navigation: ^0.0.11
  31. flutter_local_notifications:
  32. sliding_sheet:
  33. launch_review:
  34. webview_flutter:
  35. firebase_admob: ^0.9.3+2
  36. device_id: ^0.2.0
  37. flutter_native_admob: ^2.1.0
  38. flutter_typeahead: ^1.8.8

以下是我 build.gradle 中的依赖项:

  1. dependencies {
  2. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  3. testImplementation 'junit:junit:4.12'
  4. androidTestImplementation 'androidx.test:runner:1.1.1'
  5. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  6. implementation 'com.android.support:multidex:1.0.3'
  7. }
英文:

My flutter app was doing great with Mapbox, But Suddenly this happened I didn't change anything. whenever I try to run the app now it gives me this error :

  1. Duplicate class com.mapbox.mapboxsdk.plugins.annotation.Annotation found in modules classes.jar (com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v8:0.7.0) and classes.jar (com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.8.0)

Here are the dependencies in my pubspec.yaml:

  1. dependencies:
  2. flutter:
  3. sdk: flutter
  4. flutter_localizations:
  5. sdk: flutter
  6. flag: ^1.0.3
  7. shared_preferences: ^0.5.6+3
  8. provider: ^4.0.4
  9. intro_views_flutter: ^2.8.1
  10. lottie: ^0.6.0
  11. mapbox_gl: ^0.8.0
  12. location: ^3.0.2
  13. loading: ^1.0.2
  14. autocomplete_textfield: ^1.7.3
  15. flip_card: ^0.4.4
  16. animate_do: ^1.6.3
  17. highlighter_coachmark: ^0.0.3
  18. firebase_database: ^3.1.3
  19. sqflite: ^1.3.0
  20. loading_overlay: ^0.2.1
  21. flutter_spinkit: ^4.1.2+1
  22. google_fonts: ^0.4.0
  23. intl: ^0.16.0
  24. firebase_auth: ^0.16.0
  25. google_sign_in: ^4.4.1
  26. flutter_facebook_login: ^3.0.0
  27. flutter_auth_buttons: ^0.8.0
  28. steps: ^0.0.1
  29. background_location: ^0.0.9+3
  30. flutter_mapbox_navigation: ^0.0.11
  31. flutter_local_notifications:
  32. sliding_sheet:
  33. launch_review:
  34. webview_flutter:
  35. firebase_admob: ^0.9.3+2
  36. device_id: ^0.2.0
  37. flutter_native_admob: ^2.1.0
  38. flutter_typeahead: ^1.8.8dependencies:
  39. flutter:
  40. sdk: flutter
  41. flutter_localizations:
  42. sdk: flutter
  43. flag: ^1.0.3
  44. shared_preferences: ^0.5.6+3
  45. provider: ^4.0.4
  46. intro_views_flutter: ^2.8.1
  47. lottie: ^0.6.0
  48. mapbox_gl: ^0.8.0
  49. location: ^3.0.2
  50. loading: ^1.0.2
  51. autocomplete_textfield: ^1.7.3
  52. flip_card: ^0.4.4
  53. animate_do: ^1.6.3
  54. highlighter_coachmark: ^0.0.3
  55. firebase_database: ^3.1.3
  56. sqflite: ^1.3.0
  57. loading_overlay: ^0.2.1
  58. flutter_spinkit: ^4.1.2+1
  59. google_fonts: ^0.4.0
  60. intl: ^0.16.0
  61. firebase_auth: ^0.16.0
  62. google_sign_in: ^4.4.1
  63. flutter_facebook_login: ^3.0.0
  64. flutter_auth_buttons: ^0.8.0
  65. steps: ^0.0.1
  66. background_location: ^0.0.9+3
  67. flutter_mapbox_navigation: ^0.0.11
  68. flutter_local_notifications:
  69. sliding_sheet:
  70. launch_review:
  71. webview_flutter:
  72. firebase_admob: ^0.9.3+2
  73. device_id: ^0.2.0
  74. flutter_native_admob: ^2.1.0
  75. flutter_typeahead: ^1.8.8

and here are the dependencies in my build.gradle :

  1. dependencies {
  2. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  3. testImplementation 'junit:junit:4.12'
  4. androidTestImplementation 'androidx.test:runner:1.1.1'
  5. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  6. implementation 'com.android.support:multidex:1.0.3'
  7. }

答案1

得分: 0

问题已解决,经过多次尝试,问题是将这两个包一起使用:

  1. mapbox_gl: ^0.8.0
  2. flutter_mapbox_navigation: ^0.0.11

移除 flutter_mapbox_navigation: ^0.0.11 后问题得以解决。

英文:

Solved, after a lot of tries, the problem was using this to packages together :

  1. mapbox_gl: ^0.8.0
  2. flutter_mapbox_navigation: ^0.0.11

removing flutter_mapbox_navigation: ^0.0.11 fixed it

huangapple
  • 本文由 发表于 2020年9月8日 03:28:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/63783243.html
匿名

发表评论

匿名网友

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

确定