DexOverflowException: Cannot fit requested classes in the main-dex file

后端 未结 4 1627
春和景丽
春和景丽 2021-01-15 19:23

I have quite big multi module, multi flavor multidex project, but recently I got error when trying to do command line build (assemble{flavor}Release)

Message is:

4条回答
  •  执念已碎
    2021-01-15 19:49

    Disabling keeping runtime annoted classes may help. Just put it in android{} section of every module gradle file

    dexOptions {
            preDexLibraries = false
            keepRuntimeAnnotatedClasses false
        }
    

    Usually this happens when in project heavely used dagger2

提交回复
热议问题