My XML layout is not rendering with this error message. I am already using Java 8.
XML
Also using latest build tools in Gradle.
and
Click on the letter N, next to the android icon in the Preview window and select API level 23 or lower. That should solve it.