element-hq / riot-android

A glossy Matrix collaboration client for Android
Apache License 2.0
1.4k stars 394 forks source link

Can't build signed APK in Android Studio - out of memory error #3408

Closed dtygel closed 4 years ago

dtygel commented 4 years ago

Hi all, I'm having problems building the signed APK for version 0.9.9, using Android Studio.

I can run it normally in Android Studio emulator and device connected to the computer.

But when building a signed APK (appRelease), it takes ages (30 minutes) until memory runs out and build fails (out of memory).

Is there any setting I must change in Android Studio to being able to build the signed APK?

Important: matrix-android-sdk is built locally as well.

Thanks for any help there.

dtygel commented 4 years ago

The solution is to uncomment the following line in gradle.properties: org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8

Maybe this could be in the docs?