PermissionsDispatcher: Annotation processors must be explicitly declared now in 4.0.0

Overview

  • There are a lot of issues submited w/ the subject. However, all of them advice to use annotationProcessor which DOES use from the very beginning
  • Rebuild does NOT help
  • includeCompileClasspath = true from #402 does NOT help – it rises “Program type already present: android.support.v4.app.INotificationSideChannel” build error
  • repositories declarations does NOT use
  • Kotlin DOES use, but non in Activity where lib applies

Expected

  • Build should be fine w/ declaration
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    //....

    // Retrofit

    // RxJava

    // PermissionsDispatcher
    implementation "com.github.hotchemi:permissionsdispatcher:4.0.0"
    annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:4.0.0"
}

Actual

  • The following error appears
Annotation processors must be explicitly declared now.  The following dependencies on the compile classpath are found to contain annotation processor.  Please add them to the annotationProcessor configuration.
  - permissionsdispatcher-processor-4.0.0.jar (com.github.hotchemi.permissionsdispatcher:permissionsdispatcher-processor:4.0.0)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.  Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.

Environment

library version: 4.0.0 gradle plugin: 3.1.4 (4.4) Android Studio: 3.1.4 Compile SDK: 28 TargetSDK: 26

Reproducible steps

  • Will be added per request

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Sorry I don’t understand…what you should do is to declare jcenter before jitpack and that’s like general problem among jitpack and gradle. If you want to know more detail go to stackoverflow and google.

Try to change repositories in gradle file

replace this line maven { url 'https://jitpack.io' } on this line maven { url 'https://maven.google.com/'}

👍👍👍