Go to your Android Studio Folder Where it is installed. There is File stduio.exe and studio64.exe with file type of VMOPTIONS, open it in notepad you will see Something like this:
I had the same problem as you had. But now I have solve it just Updating my JDK version 1.7 to 1.8. Now it’s working fine for me. And configure the Environment Variable with JAVA_HOME and Android Studio ->Project Structure->SDK Location=>JDK Location.
In Android Studio go to Help-> Edit Custom VM Options. Hit yes button and then change 1st two values.
More Info - https://developer.android.com/studio/intro/studio-config.html
Go to your Android Studio Folder Where it is installed. There is File
stduio.exe
andstudio64.exe
with file type ofVMOPTIONS
, open it in notepad you will see Something like this:According to error you may need to change 2 values in it.
check this value and change it.
open your projects
gradle.properties
file and paste it.Just open the
gradle.properties
file in your projects and add:I met this problem when I upgraded my system to
win10
On Windows 7, what worked for me was to point the Android Studio JDK location to where the system JDK (latest) was located.
In the following images, I've marked in red the bits that should be the same.
Android Studio project,
File > Project Structure > SDK Location > JDK Location
:Command line,
java -version
:I had the same problem as you had. But now I have solve it just Updating my JDK version 1.7 to 1.8. Now it’s working fine for me. And configure the Environment Variable with JAVA_HOME and Android Studio ->Project Structure->SDK Location=>JDK Location.