美文网首页
Failed to create JVM: error code

Failed to create JVM: error code

作者: 逸小苼 | 来源:发表于2017-10-25 09:16 被阅读82次

    修改了C:\Users\[用户名]\.AndroidStudio[x.x]目录下的studio64.exe.vmoptions文件内容:

    # custom Android Studio VM options, see http://tools.android.com/tech-docs/configuration
    -Xms1024m
    -Xmx4096m 
    # <------ increase this to most of your RAM
    -XX:MaxPermSize=1024m
    -XX:ReservedCodeCacheSize=440m
    -XX:+UseCompressedOops
    -XX:+HeapDumpOnOutOfMemoryError
    -Dfile.encoding=UTF-8
    

    结果重启studio报错:

    ---------------------------
    Error launching Android Studio
    ---------------------------
    Failed to create JVM: error code -6.
    JVM Path: D:\android\SDK\android-studio\jre\jre
    If you already have a 64-bit JDK installed, define a JAVA_HOME variable in 
    Computer > System Properties > System Settings > Environment Variables.
    ---------------------------
    确定   
    ---------------------------
    

    解决方案:
    修改-Xmx4096m-Xmx2048m就可以了,看来是内存估值超标了O(∩_∩)O

    相关文章

      网友评论

          本文标题:Failed to create JVM: error code

          本文链接:https://www.haomeiwen.com/subject/dzwfpxtx.html