"
The newly created daemon process has a different context than expected. Java home is different.
Expecting: 'E:\Downloads\And_Std_2\android-studio-ide-173.4819257-windows32\android-studio\jre' but was: 'C:\Program Files\Java\jre1.8.0_181'.
Please configure the JDK to match the expected one.
"
Android Studio was working well. It hanged suddenly. When I closed and Restarted it. The Error apparead. I have checked the path. It is same. jdk location. But still error is not removing. Android Studio 3.1.3




I had the same problem, but luckily I found a solution.
You have to set the JAVA_PATH variable like this.
Step 1
Windows 7 – Right click My Computer and select Properties > Advanced
Windows 8 – Go to Control Panel > System > Advanced System Settings
Windows 10 – Search for Environment Variables then select Edit the system environment variables
Step 2
Click the Environment Variables button.
Step 3
Under System Variables, click New.
Step 4
In the Variable Name field, enter C:\android-studio\jre (The path to the Java version that comes with Android Studio)
Step 5
Click OK and Apply Changes as prompted
Step 6
Restart your computer and it will work.