Building and running app via Gradle and Android Studio is slower than via Eclipse

前端 未结 28 2255
太阳男子
太阳男子 2020-11-22 08:21

I have a multi-project (~10 modules) of which building takes about 20-30 seconds each time. When I press Run in Android Studio, I have to wait every time to rebuild the app,

28条回答
  •  自闭症患者
    2020-11-22 08:49

    Just create a file named gradle.properties in the following directory:

    /home//.gradle/ (Linux)
    /Users//.gradle/ (Mac)
    C:\Users\\.gradle (Windows)
    

    Add this line to the file:

    org.gradle.daemon=true
    

    For me the speed is now equal to Eclipse.

    Source: https://www.timroes.de/2013/09/12/speed-up-gradle/

提交回复
热议问题