M.Alkenani
M.Alkenani

Reputation: 187

Invalid maximum heap size: The specified size exceeds the maximum representable size

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.

Upvotes: 1

Views: 19263

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191711

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

Upvotes: 3

Related Questions