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

后端 未结 17 1418
无人共我
无人共我 2020-11-27 10:58

My XML layout is not rendering with this error message. I am already using Java 8.

Also using latest build tools in Gradle.

and         


        
17条回答
  •  萌比男神i
    2020-11-27 11:53

    I faced the problem "Android N requires the IDE to be running with Java 1.8 or later." The error kept showing up in spite of setting C:\Program Files\Java\jdk1.8.0_92 as the project's JDK in File > Project Structure.

    I solved it by updating JAVA_HOME in my environment variables from C:\Program Files\Java\jdk1.7.0_67 to C:\Program Files\Java\jdk1.8.0_92. When I did that and restarted Android Studio, the design mode became available.

    OS: Windows 10

    Android Studio: 2.1.2

提交回复
热议问题