最近我从我的计算机上卸载了所有JDK,并安装了新的JDK。但是我的Android Studio现在没有构建。并显示以下错误。
Error:The newly created daemon process has a different context than expected.
Java home is different.
Expecting: 'C:Program FilesAndroidAndroid Studiojre' but was: 'C:Program FilesJavajdk1.8.0_121'.
Please configure the JDK to match the expected one.
但是在我的安卓工作室中,JDK路径设置为C:Program FilesAndroidAndroid Studiojre
。但不起作用。
经过这么多次尝试,我终于通过卸载JDK并从我的计算机安装最新版本来解决此问题。设置JAVA_HOME指向最新版本的JDK。