0
votes

I get this error when I build my project in android studio preview beta 4.
the error is:

Error:Error: Could not create the Java Virtual Machine. Error:Error: A fatal exception has occurred. Program will exit. Error:Invalid maximum heap size: -Xmx4g Error:The specified size exceeds the maximum representable size. Error:Execution failed for task ':Q-municate_app:transformClassesWithDexForDevDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException

I use : https://quickblox.com/developers/Sample-webrtc-android#Sources project to build chat video app.

1
Well, where are you assigning a 4g heap size?OneCricketeer
yes it is 4g in my projectM.Alkenani
Well, according to the error, you should try changing it. Why have you set it so large?OneCricketeer
Are you using a 64 bit Java installation?OneCricketeer
It is previously set by the company of source code . I will set it 1g and try to build the project .M.Alkenani

1 Answers

2
votes

I use 32 bit java installation

32 bit applications can't use 4g of RAM. Hence size exceeds the maximum representable size

You either need to use a smaller heap, or use 64 bit Java