4
votes

I have Android Room Persistence library in project(version 1.0.0) and set compile options to 1.8. When project build finishes, i get this warning:

Warning:Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8'

Everything works fine, but this warning annoys me. How to remove it?

Adding this dependency dosn't remove warning and i don't use another architecture components.

"android.arch.lifecycle:common-java8:1.0.0"
5
post your full dependenciesEge Kuzubasioglu

5 Answers

5
votes

(Note: this answer is relevant to Kotlin based gradle projects that use the 'kotlin-kapt' plugin (kotlin annotation processor plugin), but should also be useful to Java based projects.)

This warning seems to be fixed in the latest version of the Room library.

I replaced:

kapt "android.arch.persistence.room:compiler:1.0.0"

with

kapt "android.arch.persistence.room:compiler:1.1.0-alpha1"

and the warning went away.

BTW, for Kotlin projects, the warning message varies with the Kotlin version.

With Kotlin 1.1.0 it's:

warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8'

but with Kotlin 1.2.21 it's:

warning: Supported source version 'RELEASE_7' from annotation processor 'org.jetbrains.kotlin.kapt3.ProcessorWrapper' less than -source '1.8'

The fix was the same in both cases.

1
votes

Everything works fine, but this warning annoys me. How to remove it?

Well, You need to disable lint check temporary (Not recommended), by adding these lines into build.gradle:-

android {
    lintOptions {
        tasks.lint.enabled = false
    }
...
}

Adding "android.arch.lifecycle:common-java8:1.0.0" will remove warnings for lifecycle not for room.

By the way, this is just a warning not an error. Ignore it until Google decides to support Java 8 like they did in lifecycle library.

1
votes

Updating room version from 1.0.0 to 1.1.0 gets rid of the warning.

So just have these following dependencies.

dependencies {
    def room_version = "1.1.0"

    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version"
} 
0
votes

replaced:

"android.arch.persistence.room:compiler:1.0.0"

with

"android.arch.persistence.room:compiler:1.1.1"

-1
votes

i have the same issue, but i fixed it by

replace

annotationProcessor 'android.arch.persistence.room:compiler:1.0.0'

to

annotationProcessor 'android.arch.persistence.room:compiler:1.0.0'