Go to the directory where you have Android Studio. Then go to the
bin/ subdirectory. Locate the following files, which contains Java Virtual Machine options:
Open these files and locate line with
MaxPerSize parameter. It should look as follows:
Remove this line in both files. I don't know if you are using 32-bit or 64-bit operating system, so you can update both files just in case.
I'm not sure if it will solve your problem, but I would try it in such situation. In my case, with this option and Java 8, I just get the warning, but Android Studio starts anyway. After removing this parameter, Android Studio still starts, but without warning. I'm using Ubuntu 14.04 LTS.
There is another solution for this problem described here: https://stackoverflow.com/a/27913562/1150795.
Go to File > Other Settings > Default Project Structure > JDK location and check the path.
In case of Ubuntu Linux, we can set
/usr/lib/jvm/java-7-oracle as default JDK if we are using Oracle JVM. JDK 7 is the safest option for Android.