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

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

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

问题

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

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

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

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

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  flag: ^1.0.3
  shared_preferences: ^0.5.6+3
  provider: ^4.0.4
  intro_views_flutter: ^2.8.1
  lottie: ^0.6.0
  mapbox_gl: ^0.8.0
  location: ^3.0.2
  loading: ^1.0.2
  autocomplete_textfield: ^1.7.3
  flip_card: ^0.4.4
  animate_do: ^1.6.3
  highlighter_coachmark: ^0.0.3
  firebase_database: ^3.1.3
  sqflite: ^1.3.0
  loading_overlay: ^0.2.1
  flutter_spinkit: ^4.1.2+1
  google_fonts: ^0.4.0
  intl: ^0.16.0
  firebase_auth: ^0.16.0
  google_sign_in: ^4.4.1
  flutter_facebook_login: ^3.0.0
  flutter_auth_buttons: ^0.8.0
  steps: ^0.0.1
  background_location: ^0.0.9+3
  flutter_mapbox_navigation: ^0.0.11
  flutter_local_notifications:
  sliding_sheet:
  launch_review:
  webview_flutter:
  firebase_admob: ^0.9.3+2
  device_id: ^0.2.0
  flutter_native_admob: ^2.1.0
  flutter_typeahead: ^1.8.8

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

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

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 :

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:

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  flag: ^1.0.3
  shared_preferences: ^0.5.6+3
  provider: ^4.0.4
  intro_views_flutter: ^2.8.1
  lottie: ^0.6.0
  mapbox_gl: ^0.8.0
  location: ^3.0.2
  loading: ^1.0.2
  autocomplete_textfield: ^1.7.3
  flip_card: ^0.4.4
  animate_do: ^1.6.3
  highlighter_coachmark: ^0.0.3
  firebase_database: ^3.1.3
  sqflite: ^1.3.0
  loading_overlay: ^0.2.1
  flutter_spinkit: ^4.1.2+1
  google_fonts: ^0.4.0
  intl: ^0.16.0
  firebase_auth: ^0.16.0
  google_sign_in: ^4.4.1
  flutter_facebook_login: ^3.0.0
  flutter_auth_buttons: ^0.8.0
  steps: ^0.0.1
  background_location: ^0.0.9+3
  flutter_mapbox_navigation: ^0.0.11
  flutter_local_notifications:
  sliding_sheet:
  launch_review:
  webview_flutter:
  firebase_admob: ^0.9.3+2
  device_id: ^0.2.0
  flutter_native_admob: ^2.1.0
  flutter_typeahead: ^1.8.8dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  flag: ^1.0.3
  shared_preferences: ^0.5.6+3
  provider: ^4.0.4
  intro_views_flutter: ^2.8.1
  lottie: ^0.6.0
  mapbox_gl: ^0.8.0
  location: ^3.0.2
  loading: ^1.0.2
  autocomplete_textfield: ^1.7.3
  flip_card: ^0.4.4
  animate_do: ^1.6.3
  highlighter_coachmark: ^0.0.3
  firebase_database: ^3.1.3
  sqflite: ^1.3.0
  loading_overlay: ^0.2.1
  flutter_spinkit: ^4.1.2+1
  google_fonts: ^0.4.0
  intl: ^0.16.0
  firebase_auth: ^0.16.0
  google_sign_in: ^4.4.1
  flutter_facebook_login: ^3.0.0
  flutter_auth_buttons: ^0.8.0
  steps: ^0.0.1
  background_location: ^0.0.9+3
  flutter_mapbox_navigation: ^0.0.11
  flutter_local_notifications:
  sliding_sheet:
  launch_review:
  webview_flutter:
  firebase_admob: ^0.9.3+2
  device_id: ^0.2.0
  flutter_native_admob: ^2.1.0
  flutter_typeahead: ^1.8.8

and here are the dependencies in my build.gradle :

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

答案1

得分: 0

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

  mapbox_gl: ^0.8.0
  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 :

  mapbox_gl: ^0.8.0
  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:

确定