Flutter上的Image_Picker构建失败(任务':app:transformClassesWithMultidexlistForDebug'的执行失败。)

时间:2019-05-07 19:23:06

标签: android dart flutter android-gradle flutter-dependencies

我使用了image_picker( ^ 0.6.0 + 2 )和image_cropper( ^ 1.0.1 ) 当 flutter运行构建失败时。

Note: Recompile with -Xlint:deprecation for details.                    

FAILURE: Build failed with an exception.                                

* What went wrong:                                                      
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.

* 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 32s  

我用了很多东西来解决这个问题。之后,我删除了image_picker和image_cropper,然后应用程序完美运行。

  

IOS运行正常,Android构建失败

1 个答案:

答案 0 :(得分:0)

已解决

  1. 在VSCode上打开项目,在Android Studio上打开Android模块并迁移到AndroidX