You are most likely exhausting the heap size especially during compilation. Try to add inside this setting in your
You can also reduce the build time too by setting
Follow @amardeepvijay
app/build.gradle:android {
.
.
.
dexOptions {
javaMaxHeapSize "4g"
}
}
You can also reduce the build time too by setting
incremental to be true:android {
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
}
Still not working? Try to increase the heap size of Android Studio.
- Quit Android Studio.
- Create or edit a
studio.vmoptionsfile.- On Mac, this file should be in
~/Library/Preferences/AndroidStudio/studio.vmoptions. - On Windows, it should be in
%USERPROFILE%\.AndroidStudio\studio[64].exe.vmoptions.
Increase the maximum memory to 2 Gb and max heap size of 1 Gb.-Xmx2048m -XX:MaxPermSize=1024m` - On Mac, this file should be in
- Start Android Studio.
No comments:
Post a Comment