【问题标题】:Android Studio Wont Launch Ubuntu Could not find main classAndroid Studio 无法启动 Ubuntu 找不到主类
【发布时间】:2017-12-14 22:06:59
【问题描述】:

我正在尝试启动 android studio,但我立即收到此错误,

Error: Could not find or load main class #

在我尝试通过以下方式更改 VM 设置之前它正在工作 帮助> 编辑自定义 VM 选项 到这个

-Xms1024m 
-Xmx4096m # <------ increase this to most of your RAM 
-XX:MaxPermSize=1024m 
-XX:ReservedCodeCacheSize=440m 
-XX:+UseCompressedOops 
-XX:+HeapDumpOnOutOfMemoryError 
-Dfile.encoding=UTF-8

【问题讨论】:

标签: java android android-studio intellij-idea


【解决方案1】:

如果 vmoptions 中有 #,Android Studio 将不会启动

导致此问题的文件在

中找到
~/.AndroidStudio2.3/studio64.vmoptions

内容:

-Xms1024m
-Xmx8192m # <------ increase this to most of your RAM
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=440m
-XX:+UseCompressedOops
-XX:+HeapDumpOnOutOfMemoryError
-Dfile.encoding=UTF-8

导致错误的行:

-Xmx8192m # <------ increase this to most of your RAM

到这里:

-Xmx8192m

【讨论】:

    猜你喜欢
    • 2013-10-09
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-09
    • 2018-06-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多