Extremely long build with Gradle (Android Studio)

前端 未结 5 630
天涯浪人
天涯浪人 2020-11-29 21:17

right now we are in a situation of having build times 2 minutes 30 seconds for very simple change. This (compared to ANT) is amazingly slow and is killing the productivity o

5条回答
  •  情歌与酒
    2020-11-29 21:48

    Our team was facing the same issue. Our project exceeds the method limit for dex(>65k). So, in out library project we put below options in build.gradle:

    dexOptions {
        jumboMode = true
        preDexLibraries = false
    }
    

    In our project build.gradle:

     dexOptions {
        jumboMode = true
    //  incremental true
    }
    

    previously we had incremental true. after commenting it its taking around 20s to run as compared to 2mins 30 seconds. I don't know this may solve your problem. but it can help to others. :)

提交回复
热议问题