I am using Android Studio 3.0.8, gradle - 4.1.
I added the log4j2 dependency and the annotation processor necessary for it to my build.gradle module:
compile "org.apache.logging.log4j:log4j-core:2.8"
annotationProcessor 'org.apache.logging.log4j:log4j-core:2.8'
But I have an error:
Error: could not find annotationProcessor () method for arguments [org.apache.logging.log4j.core] on an object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
The annotation process is enabled by default: https://yadi.sk/i/MinCMsK33LZkjM
I am using libgdx. Build.gradle (module - core):
apply plugin: "java"
targetCompatibility = 1.8
sourceCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.java.srcDirs = [ "src/" ]
eclipse.project {
name = appName + "-core"
}
dependencies {
compile "org.apache.logging.log4j:log4j-core:2.8"
annotationProcessor 'org.apache.logging.log4j:log4j-core:2.8'
}
I tried to add it to the build.gradle project, invalid cash. But the error remains the same. gradle cannot use annotationProcessor for log4j2.