Can I enable multidex in Android debug build only?

后端 未结 4 1327
南方客
南方客 2021-01-07 23:22

Dears, I read in many blog posts that multidex apps startup is slower than normal apps. My app uses a lot of libraries that exceed 64k methods so I use multidex. But w

4条回答
  •  走了就别回头了
    2021-01-07 23:34

    Yes, you can. When you declare your buildTypes include multidex only for debug:

    buildTypes {
        release {
            multiDexEnabled false
        }
        debug {
            multiDexEnabled true
        }
    }
    

提交回复
热议问题