Failed to notify project evaluation listener for web3j plugin

Hi Team,

I have to use web3j gradle wrapper. I have added the dependicies in the gradle build as given below. When I am running gradlew I am getting below error. Please suggest how to resolve this.

"Failed to notify project evaluation listener.

‘void org.gradle.api.internal.file.DefaultSourceDirectorySet.(java.lang.String, java.lang.String, org.gradle.api.internal.file.FileResolver, org.gradle.api.internal.file.collections.DirectoryFileTreeFactory)’
"

/*

  • This file was generated by the Gradle ‘init’ task.
  • This generated file contains a sample Java Library project to get you started.
  • For more details take a look at the Java Libraries chapter in the Gradle
  • User Manual available at The Java Library Plugin
    */

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath ‘org.web3j:web3j-gradle-plugin:4.5.11’
}
}

plugins {
// Apply the java-library plugin to add support for Java Library
id ‘java-library’
}

apply plugin: ‘org.web3j’

repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}

dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api ‘org.apache.commons:commons-math3:3.6.1’

// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:28.2-jre'
implementation 'org.web3j:core:4.5.11'

// Use JUnit test framework
testImplementation 'junit:junit:4.12'

}

poojagupta@Poojas-MacBook-Air abcd % ./gradlew build

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘abcd’.

Failed to notify project evaluation listener.
‘void org.gradle.api.internal.file.DefaultSourceDirectorySet.(java.lang.String, java.lang.String, org.gradle.api.internal.file.FileResolver, org.gradle.api.internal.file.collections.DirectoryFileTreeFactory)’

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface

BUILD FAILED in 1s

Dear Pooja,

I was able to resolve this issue by upgrading to the most recent version of the web3j gradle plugin (4.8.4). Please let me know if upgrading resolves this issue!