permissions-dispatcher/AndroidAnnotationsPermissionsDispatcherPlugin

Cannot access 'methodExample: it is protected in 'ActivityTools'

krokofant opened this issue · 2 comments

I'm using AA 4.4.0 and Kotlin.

  1. I get a lot of these errors, yet, the example is using protected methods.
Cannot access 'methodExample: it is protected in 'ActivityTools'
  1. If I remove any function modifier keyword I still get an issue with a missing variable in the generated dispatcher:
ActivityTools_.java:155: error: cannot find symbol
        ActivityToolsPermissionsDispatcher.onRequestPermissionsResult(this, requestCode, grantResults);
        ^
  symbol:   variable ActivityToolsPermissionsDispatcher
  location: class ActivityTools_

I don't know if this is related to #15 , doesn't this plugin support Kotlin at all?

Dependencies:

def AAVersion = "4.4.0"
dependencies {
    // ...
    // AA
    kapt "org.androidannotations:androidannotations:$AAVersion"
    implementation "org.androidannotations:androidannotations-api:$AAVersion"

    implementation "com.github.hotchemi:permissionsdispatcher:3.0.1"
    kapt "com.github.hotchemi:permissionsdispatcher-processor:3.0.1"
    kapt "com.github.AleksanderMielczarek:AndroidAnnotationsPermissionsDispatcherPlugin:2.1.0"
}

Currently plugin doesn't support Kotlin with PermissionsDispatcher 3.x.x and above due to different method generated for Kotlin code. Workaround is to downgrade PermissionsDispatcher to 2.x.x and plugin to 2.0.3.

I'm trying to fix it.

@AleksanderMielczarek Thank you! I missed the changelog notice at first.

I'll look out for new releases.