Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android-Room error: package javax.annotation.processing does not exist

I have an android project with java and kotlin. When i execute 'gradle app:assemble", i get the error output:

error: package javax.annotation.processing does not exist import javax.annotation.processing.Generated;

error: cannot find symbol @Generated("androidx.room.RoomProcessor")

I added 'com.google.code.findbugs:jsr305:3.0.2' but it's not working.

like image 422
Hyeyeon Avatar asked Jun 24 '20 00:06

Hyeyeon


2 Answers

Dependencies for Room in my project are implementation "androidx.room:room-runtime:$room_version", "androidx.room:room-compiler:$room_version".

i add compileOnly 'com.github.pengrad:jdk9-deps:1.0'. it works for me.

like image 198
Hyeyeon Avatar answered Sep 21 '22 17:09

Hyeyeon


I added this line of code in the file build.gradle(:app) in the part of dependencies and it works!

dependencies { compileOnly 'com.github.pengrad:jdk9-deps:1.0'

enter image description here

Source: https://github.com/pengrad/jdk9-deps

like image 28
Daniela Ramirez Gomez Avatar answered Sep 17 '22 17:09

Daniela Ramirez Gomez