How do I resolve a Gradle exception 'No signature method' with the build.gradle file?

Problem: I’m struggling to resolve a ‘No signature of method’ error which appears to pertain to the app level build.gradle file at the android method. All the methods there in contained in the android method have dotted underscores, which I thought probably means I need to update or implement something but I’m not sure exactly. I can’t build an APK nor debug because of it. I can only run the app project.

This project was last worked about a year or so ago, so updates to gradle implementation versions were needed, including the JDK due to alerts of the previous version having bug issue.

What I’ve tried: I’ve spent a lot of time on StackOverflow and there are many similar issues, but the error was different. Some were very similar and I tried updating, such as one was about the update of the minifyEnabled true or false, which didn’t work.

The only experience I have with Gradle is adding dependencies for some android libraries such as Room. I don’t often interact with it because it nearly always implements the changes or prompts me. I’ve attached a couple images for a visual of what I’m seeing since simply adding the code in a literal form here will not show dotted underscore clearly.

I hope there is something you may be able to suggest. I’ve been struggling to get it working. I’m using:

  • Intellij Idea 2021.1.1
  • JDK 11
  • Gradle 4.1.3
  • Android 29 (min 28)

dependencies {
implementation ''
def room_version = '2.3.0'
implementation 'org.jetbrains:annotations:20.1.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "androidx.recyclerview:recyclerview:1.2.0"
// For control over item selection of both touch and mouse driven selection
implementation "androidx.recyclerview:recyclerview-selection:1.1.0"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation ''
implementation "$room_version"
annotationProcessor "$room_version"

// optional - RxJava2 support for Room
implementation "$room_version"

// optional - RxJava3 support for Room
implementation "$room_version"

// optional - Guava support for Room, including Optional and ListenableFuture
implementation "$room_version"

// optional - Test helpers
testImplementation "$room_version"