Geolocator插件问题:程序类型已存在:android.support.v4.app.INotificationSideChannel

时间:2019-03-19 13:31:31

标签: plugins flutter

我正在使用AndroidX重大更改之前的依赖项。我只添加了geolocator 2.1.1版本,这是AndroidX更改之前的版本。但我收到以下错误。你能帮我弄清楚吗?

这是我所有的依赖项:

cupertino_icons: 0.1.2
  http: 0.11.3+17
  shared_preferences: 0.4.3
  path_provider: 0.4.1
  rxdart: 0.20.0
  device_info: 0.3.0
  image_picker: 0.4.10
  image_cropper: 0.0.9
  flutter_html: 0.8.2
  share: 0.5.3
  url_launcher: 4.0.3
  webview_flutter: 0.2.0
  page_view_indicators: 1.1.0
  onesignal: 1.0.5
  logging: 0.11.3+2
  timeago: 2.0.8
  sqflite: 1.0.0
  geolocator: 2.1.1

这是日志:

D8: Program type already present: android.support.v4.app.INotificationSideChannel

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/2.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/3.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/4.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/5.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/6.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/7.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/8.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/9.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/10.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/11.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/12.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/13.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/14.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/15.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/16.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/17.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/18.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/19.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/20.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/21.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/22.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/23.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/24.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/25.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/26.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/27.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/28.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/29.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/30.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/31.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/32.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/33.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/34.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/35.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/36.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/37.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/38.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/39.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/40.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/41.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/42.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/43.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/44.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/45.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/46.jar, /Users/figengungor/Documents/development/tabit/build/app/intermediates/transforms/dexBuilder/debug/47.jar
  Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
  Program type already present: android.support.v4.app.INotificationSideChannel

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See ... for more information on the problem and how to fix it.
*******************************************************************************************
Finished with error: Gradle task assembleDebug failed with exit code 1

1 个答案:

答案 0 :(得分:0)

我刚刚迁移到AndroidX并更新了我的依赖关系,并使用android.enableJetifier = true解决了我的问题。 \ O /