-1

I'm getting error in the DESIGN:

Android N requires the IDE to be running with java 1.8 or later

I went to the Project Structure > JDK location changed it from 1.7 to the latest I just downloaded 1.8 changed it to: C:\Program Files\Java\jdk1.8.0_91 But still getting this message.

I tried to google found someone else solution also to Set JDK_HOME and JAVA_HOME environment variables. But I can't find where to set this variables.

This is the solution but not sure how to do it:

solution

Community
  • 1
  • 1
Daniel Voit
  • 111
  • 1
  • 10

3 Answers3

1

I guess you use Window. See this link.

GAVD
  • 1,977
  • 3
  • 22
  • 40
1

If you are using windows Step 1 : First open control panel. Step 2 : In the top right You can find search box, in that you type environment and click search. Step 3 : In that click EDIT SYSTEM ENVIRONMENT VARIABLES. step 4 : System Properties Dialogue box will open, in that advanced tab click environment variables. Step 5 : Environment dialogue box will open in that system variables click new and set the variable name : JAVA_HOME and variable value :C:\Program Files\Java\jdk x.x.x_xx. In x set your value

Kapil
  • 83
  • 1
  • 10
0

Environment variables are set for the operating systems and is not dependent on the Android Studio. You can find the details below for setting JAVA_HOME environment variables based on your OS:

https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/

For JDK_HOME you can follow the same procedure by giving the path to your jdk installation