导入第三方aar库后,编译出现如下异常:
> Task :app:compileK4t3ReleaseJavaWithJavac FAILED
Gradle may disable incremental compilation as the following annotation processors are not incremental: realm-annotations-processor-3.0.0.jar (io.realm:realm-annotations-processor:3.0.0), butterknife-compiler-8.8.1.jar (com.jakewharton:butterknife-compiler:8.8.1), classes.jar (******.aar).
Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.
Execution failed for task ':app:compileK4t3ReleaseJavaWithJavac'.
> Invalid signature file digest for Manifest main attributes
根据提示是由于gradle不支持注解处理器的增量编译导致的编译失败,根据提示,可在gradle.properties中加入android.enableSeparateAnnotationProcessing=true 设置来解决; 增量编译功能是与 Gradle 4.10.1 及更高版本兼容的,但由于 Gradle问题,与 Gradle 5.1 并不兼容,故在gradle5.1.1版本中不能通过添加android.enableSeparateAnnotationProcessing=true 设置来解决该编译失败问题。
|