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

后端 未结 17 1415
无人共我
无人共我 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条回答
  •  难免孤独
    2020-11-27 11:44

    try to use in project Java 1.8 - download last version of JDK and install it(if JSK is absent)

    Then add to build.gradle these lines android { ... // Configure only for each module that uses Java 8 // language features (either in its source code or // through dependencies). compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } // For Kotlin projects kotlinOptions { jvmTarget = "1.8" } }

提交回复
热议问题