I am trying to implement a Rooms database as part of a project in Android Studio. Gradle versions are the latest:
Android Gradle Plugin Version: 7.0.2
Gradle Version: 7.4
According to the tutorial (Android Room with a View - Java | Android Developers), one of the lines I need to add to my build.gradle (app) is the following:
annotationProcessor "androidx.room:room-compiler:$rootProject.roomVersion"
However, when this line is included, I get the following build error:
Could not set unknown property 'annotationProcessor' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler:41
When this line is commented out, the app will compile, but not run.
From the research I’ve been doing, I feel like I’m missing something in my gradle configuration. But I’m a complete novice when it comes to gradle, and I’ve been banging my head against this problem for a couple hours now with no luck.
Any help is appreciated! If there is additional information I need to provide, please let me know.
Theresa