Run application via gradlew with -Xmx and -Xms

前端 未结 3 1943
忘掉有多难
忘掉有多难 2021-02-11 23:15

I have an application. I run it via

gradlew run-app

Or debug

gradlew debug-app

It works. How do I pass \'-Xm

3条回答
  •  一向
    一向 (楼主)
    2021-02-11 23:34

    Add this in your gradle.properties file :

    org.gradle.jvmargs=-Xmx2000m
    

    From here

    org.gradle.jvmargs

    Specifies the jvmargs used for the daemon process. The setting is particularly useful for tweaking memory settings. At the moment the default settings are pretty generous with regards to memory.

    edit : my answer what about the gradle daemon jvm, not the app jvm. You have to use the jvmArgs property

    The extra arguments to use to launch the JVM for the process. Does not include system properties and the minimum/maximum heap size.

提交回复
热议问题