Android Studio requires two jdk:ide JDK and project JDK:
The former is the JDK that the IDE uses to run itself.
The latter is used to compile Java code
Project JDK
You can see the changes through file-> other settings-> default project structure
If the item compilesdkversion >= 21, it should be set to JAVA7 or 8
This configuration can also be set in Local.properties
IDE JDK
The problem is that the Android N version of the layout editor requires IDE jdk1.8 and the above versions to display properly
It is important to note that you do not modify Info.plish, which destroys the IDE signature and affects patch updates.
Mac can be opened in this way
$ export STUDIO_JDK=/LIBRARY/JAVA/JAVAVIRTUALMACHINES/JDK1. 8 /applications/android\ Studio.app
Normal use of Android N version of the layout editor but the problem is here again.
On Mac systems, the default IDE JDK is 1.6. This is mainly because fonts have antialiasing on the jdk1.6, while 1.7 and 1.8 do not. Using jkd1.8: Using jkd1.6:
And there are some other questions I won't go into.
All in all, if you're like me. Use Mac OSX to use 2.1.2 's Android studio first, and then lower the version of the layout editor.
If you have to study, go check it out. Portal (FQ required)
Android N requires the IDE to being running with Java 1.8 or later