Hello Guys我在生成sign apk时发现了这个错误 .
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.
我的配置 - Android Studio 3.0.1 Build#AI-171.4443003,建于2017年11月9日JRE:1.8.0_152-release-915-b01 amd64 JVM:OpenJDK 64位服务器VM by JetBrains s.r.o Windows 10 10.0
2 回答
检查项目使用的java版本 . 它可以与Studio使用的不同 .
例如 :
很棒的工作!!!谢谢@olikaf和@ChrisStillwell