简体   繁体   English

[react-native][Xcode 13.1] 无法识别的 VM 选项 'MaxPermSize=4096m' Mac M1 (Monterey)

[英][react-native][Xcode 13.1] unrecognized VM option 'MaxPermSize=4096m' Mac M1 (Monterey)

I've freshly installed Mac Monterey OS with latest version of Java JDK 17 & XCode 13.1我刚刚安装了最新版本的Mac Monterey OS和 Java JDK 17 & XCode 13.1

When I run npm run android to build my project I get below error.当我运行npm run android来构建我的项目时,出现以下错误。

在此处输入图像描述

unrecognized VM option 'MaxPermSize=4096m' 
Error: Could not create the Java Virtual Machine

After spending 2hrs on this issue I removed the Java JDK 17 and installed jdk-15.0.2 because in Big Sur i was using this version itself & this fixed the problem and the project build was successful.在这个问题上花了 2 小时后,我删除了 Java JDK 17并安装了jdk-15.0.2 ,因为在Big Sur我自己使用的是这个版本,这解决了问题并且项目构建成功。

I got the same issue.我遇到了同样的问题。 The fix in my case was to refer to a correct version of JDK .在我的情况下,解决方法是引用正确版本的 JDK My Android Studio is 64-bit (on Windows you can see it in task manager as studio64.exe) while it was referring to 32-bit JDK.我的 Android Studio 是 64 位的(在 Windows 上,您可以在任务管理器中看到它为 studio64.exe),而它指的是 32 位 JDK。 To check it go to File > Other Settings > Default Project Structure > JDK location and check the path.要检查它 go 到File > Other Settings > Default Project Structure > JDK location并检查路径。 Select the correct version of JDK. Select JDK 的正确版本。 If you don't have a 64-bit JDK then download and install it.如果您没有 64 位 JDK,请下载并安装它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 运行 React Native Apps 时无法识别 VM 选项“MaxPermSize=512m”并且无法创建 Java 虚拟机 - Unrecognized VM option 'MaxPermSize=512m' and Could not create the Java Virtual Machine when running React Native Apps 运行Zeppelin时无法识别的VM选项'MaxPermSize = 512m' - Unrecognized VM option 'MaxPermSize=512m' when running Zeppelin Android Studio - 无法识别的 VM 选项“MaxPermSize=256m” - Android Studio - Unrecognized VM option 'MaxPermSize=256m' 运行Maven测试时Jenkins Java VM错误-无法识别的VM选项'MaxPermSize-128m' - Jenkins Java VM error when running a Maven test - Unrecognized VM option 'MaxPermSize-128m' 带有 Maven Wrapper 的 Java 17 导致无法识别的 VM 选项“MaxPermSize=512m” - Java 17 with Maven Wrapper results in Unrecognized VM option 'MaxPermSize=512m' 需要检查MaxPermSize:无法识别的VM选项 - Need to check MaxPermSize : Unrecognized VM option OpenJDK 64位服务器VM警告:忽略选项MaxPermSize = 350m; - OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m; Java 在 Windows 11 VM 上突然退出(主机是 M1 Mac) - Java exits abruptly on a Windows 11 VM (host is M1 Mac) 在 M1 Mac 上使用 quarkus 构建原生镜像失败 - Building native image using quarkus on a M1 Mac fails Java 7 可用于 M1 Mac 吗? - Is Java 7 available for M1 Mac?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM