飞镖中的“ multi_image_picker”问题

时间:2019-04-17 17:11:20

标签: dart flutter

我遇到库 minSdk 的问题:建议:使用兼容的库,其minSdk最多为16,或者将该项目的minSdk版本提高到至少19 我在 minSdkVersion 部分中更改了build.gradle,但显示了此内容:

D8:程序类型已存在:android.support.v4.app.INotificationSideChannel $ Stub

失败:构建失败,并出现异常。

  • 出了什么问题: 任务':app:transformDexArchiveWithExternalLibsDexMergerForDebug'的执行失败。
    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.prueba_2"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
D8: Program type already present: android.support.v4.app.INotificationSideChannel$Stub

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: C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\6.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\7.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\8.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\9.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\10.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\11.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\12.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\13.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\14.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\15.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\16.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\17.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\18.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\19.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\20.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\21.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\22.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\23.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\24.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\25.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\26.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\27.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\28.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\29.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\30.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\31.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\32.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\33.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\34.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\35.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\36.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\37.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\38.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\39.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\40.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\41.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\42.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\43.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\44.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\45.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\46.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\47.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\48.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\49.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\50.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\51.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\52.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\53.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\54.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\55.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\56.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\57.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\58.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\59.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\60.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\61.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\62.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\63.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\64.jar, C:\Users\ANALYSIC-NABLA\Documents\Flutter\Development\prueba_2\build\app\intermediates\transforms\dexBuilder\debug\65.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$Stub

* 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
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.706], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] VS Code (version 1.33.1)
[√] Connected device (1 available)

• No issues found!

2 个答案:

答案 0 :(得分:0)

此插件已从不赞成使用的Android支持库迁移到AndroidX。如果您的项目也已迁移到可以使用的状态,则应安装该插件的版本4.X.X。如果您使用的是旧项目结构,请使用2.4.11版

答案 1 :(得分:0)

有同样的问题。 尝试按照Flutter文档的建议使用此方法迁移到AndroidX:

1。尝试菜单“重构”>迁移到AndroidX

2.got“未找到用法”

我仍然有错误,所以我尝试了此链接中的解决方案(使用选定的答案):

[Flutter Projects & Android X Migration Issues

效果很好