Monaca Docs
Search…
Monaca
Release Notes and Updates
Product Guides
Tutorials
API Reference
Monaca API
Core Cordova Plugins
Third-party Cordova Plugins
Monaca Power Plugins
Monaca HTML5 Resource Encryption
Monaca In-App Updater
Monaca Secure Storage
Barcode Scanner Plugin
Android build memory size setting
Service Integration
Configuration Files
Samples & Tips
Features
FAQ
Supported Environments
Monaca Product Website
日本語
Powered By
GitBook
Android build memory size setting
This plugin sets the maximum memory usage for Gradle when building Android apps.
In order to use this plugin, you are required to subscribe to a valid plan. Please refer to
Monaca Subscription Plans
.
Supported Platforms
Cordova 10 or higher
How to Add Plugin
1.
From Monaca Cloud IDE menu, go to
Configure → Cordova Plugin Settings
.
2.
Under
Available Plugins
section, hover over the the
MaxMemForAndroidBuild
plugin and click
Enable
button.
Setting the maximum memory size at build time
1.
Open the project and open
config.xml
.
2.
If you want to set the memory size used in the Android build process to 4096Mb, you can do so as follows
1
<
preference
name
=
"
monaca:jvmargs
"
value
=
"
-Xmx4096m
"
/>
Copied!
3.
Then you also need to change the maximum memory size used by Gradle Daemon, for example, if you want to set it to 4G, set it as follows
1
<
preference
name
=
"
monaca:env:GRADLE_OPTS
"
value
=
"
-Dorg.gradle.jvmargs=
'
-Xmx4G
'"
/>
Copied!
Previous
Barcode Scanner Plugin
Next
Service Integration
Last modified
10mo ago
Copy link
Contents
Supported Platforms
How to Add Plugin
Setting the maximum memory size at build time