android / architecture-components-samples

Samples for Android Architecture Components.
https://d.android.com/arch
Apache License 2.0
23.4k stars 8.29k forks source link

Room (possibly others) dont seem to compile with Java 8 #35

Closed RichyHBM closed 7 years ago

RichyHBM commented 7 years ago

I am getting this error specifically by trying to use kotlin with Room, but I assume this would also occur if you are using Java 8 in your source code.

The error is: Warning:warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8' and seems to be from a use of @SupportedSourceVersion which specifies "the latest source version an annotation processor supports"? Is this expected? Do we need to wait for the full 1.0 release for it to be fully supported?

mynote commented 7 years ago

Its a warning, not an error. If you use Java 8 features like Lambdas, its just prints a warning that rooms annotation processor uses java 7 for generating code. Ignore it since it is just a warning. I think room uses java 7 to let developers decide if they want to use java 8 (annotations) or 7 for now.

yigit commented 7 years ago

Yes, it is just a warning. Should not be a problem.

kenyee commented 6 years ago

Would be nice if there were a Gradle flag we could use to turn this warning off...it's the only warning in our project build :-(

mttmllns commented 6 years ago

Another vote for patching this up somehow. It's the only thing keeping us from treating warnings as errors.

ezamelczyk commented 6 years ago

Just pass -Xlint:unchecked to your Gradle flags until Google decides to support Java 8 like in lifecycle library.

aldoKelvianto commented 6 years ago

If somebody still encounter this warning, I suggest use common-java8 instead of compiler.

-    annotationProcessor "android.arch.lifecycle:compiler:1.0.0"
+    implementation "android.arch.lifecycle:common-java8:1.0.0"

In my project the warning disappear. I hope this helps.

mtrewartha commented 6 years ago

That gets rid of the warning for the lifecycle stuff, but not for the Room stuff.

mibrahimdev commented 6 years ago

I have the same problem but I don't know how to solve I'm using Android studio 3.10

SerggioC commented 6 years ago

So many bugs...

successanil commented 6 years ago

upgrade to room 1.1.1, java 8 and warning will disappear.

shekharartemedia commented 6 years ago

i have update the room version but still i getting the same issue. Please help.

vinisantos630 commented 5 months ago

Boa noite pessoal, estou com o mesmo problema só que em Java, para gerar relatórios no JasperReport Studio, segue abaixo a mensagem:

net.sf.jasperreports.engine.design.JRJdk13Compiler compileClasses INFORMAÇÕES: warning: Supported source version 'RELEASE_8' from annotation processor 'net.sf.jasperreports.annotations.processors.properties.PropertyProcessor' less than -source '17' 1 warning

Entendi que é um aviso, mas o executável não deixa gerar o relatório por conta desse "erro", alguém conseguiu uma solução?

sebm123 commented 2 months ago

I am getting this error specifically by trying to use kotlin with Room, but I assume this would also occur if you are using Java 8 in your source code.

The error is: Warning:warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8' and seems to be from a use of @SupportedSourceVersion which specifies "the latest source version an annotation processor supports"? Is this expected? Do we need to wait for the full 1.0 release for it to be fully supported?

sebm123 commented 2 months ago

[Uploading OpenMQTTGateway-development.zip…]()

thewyp commented 2 months ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。