android - Flutter 上的 Image_Picker 构建失败(任务“:app:transformClassesWithMultidexlistForDebug”的执行失败。)
问题描述
当颤振运行构建失败时,我使用了 image_picker( ^0.6.0+2 ) 和 image_cropper( ^1.0.1 )。
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 构建失败
解决方案
解决了
- 在 VSCode 上打开项目并在 Android Studio 上打开 Android 模块并迁移到 AndroidX
推荐阅读
- vagrant - 在主机重新启动后运行 `vagrant up` 和 `vagrant ssh` 而不停止 Vagrant,VM 进入中止/错误状态
- javascript - ReactJS:如何从 useState 钩子中导出变量?
- asp.net-mvc - Ñ 字符在 HTML SELECT 中错误地显示为 Ñ
- python - CVXPY 对转子平衡问题的约束
- c - gdb 中的分段错误是否显示物理地址或虚拟地址?
- sql - 在条件 ORACLE SQL 中使用 max
- firebase - 如何从 Web 应用程序发布事件和指标以便于分析它们?
- amazon-web-services - 我可以有条件地在 AWS Appsync 解析器中调用 lambda 函数吗?
- javascript - 设置超时后无法访问 Javascript 函数
- python - 为什么 super() 继承了“错误”的类?