Gradle in Android Studio giving error Project sync failed

后端 未结 10 1998
野性不改
野性不改 2020-12-11 04:09

I am new to Android Studio.I installed Android Studio-1.2.1.1 and i have jdk1.7.0_40 installed.I am facing problem with gradle build. For reference you can check gradle issu

10条回答
  •  星月不相逢
    2020-12-11 04:16

    This is 2019. For anyone experiencing this issue... The first thing is to make sure that you correctly set your environment variables as per this instruction: https://www.mkyong.com/java/how-to-set-java_home-on-windows-10/

    Which means you should be able to type javac -version and java -version and get the version number inside your Home directory.

    Once you can confirm this, then go to the Project Structure inside, the SDK Location > JDK Location select Use JAVA_HOME environment variable.

    This was what I did and it worked.

提交回复
热议问题