Robert I
Robert I

Reputation: 1527

Android Studio Wont Launch Ubuntu Could not find main class

I am trying to launch android studio but I get this error instantly,

Error: Could not find or load main class #

It was working before I tried to change the VM settings via Help> Edit Custom VM Options to this

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

Upvotes: 0

Views: 67

Answers (1)

Robert I
Robert I

Reputation: 1527

Android Studio will not launch if there is a # in the vmoptions

The file that caused this was found in

~/.AndroidStudio2.3/studio64.vmoptions

Contents:

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

Line that causes error:

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

To this:

-Xmx8192m

Upvotes: 1

Related Questions