Note that the compile
, runtime
, testCompile
, and testRuntime
configurations introduced by the Java plugin have been deprecated since Gradle 4.10 (Aug 27, 2018), and were finally removed in Gradle 7.0 (Apr 9, 2021).
The aforementioned configurations should be replaced by implementation
, runtimeOnly
, testImplementation
, and testRuntimeOnly
, respectively.
Make sure that you are editing the correct build.gradle
file. I received this error when editing android/build.gradle
rather than android/app/build.gradle
.
compile
is a configuration
that is usually introduced by a plugin (most likely the java plugin) Have a look at the gradle userguide for details about configurations. For now adding the java plugin on top of your build script should do the trick:
apply plugin:'java'
It should be exclude module: 'net.milkbowl:vault:1.2.27'
(add module:
) as explained in documentation for DependencyHandler
linked from here because ModuleDependency.exclude(java.util.Map)
method is used.
In my case, all the compile
statements has somehow arranged in a single line. separating them in individual lines has fixed the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With