om.android.build.api.transform.TransformException: Error while generating the main dex list. * Try:

1. 錯誤描述

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

2. 錯誤原因

設置了MultiDex,但是沒有初始化

3. 解決方案

在自定義的Application的onCreate()中進行初始化;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章