As described here https://github.com/hotchemi/PermissionsDispatcher#must
You need to add the @RuntimePermissions annotation to your activity and the @NeedsPermission annotation to the method at a minimum.
In build.gradle add the following:
buildscript { dependencies { classpath 'com.neenbedankt.gradle.plugins:android-apt:1.7' } } apply plugin: 'android-apt' dependencies { compile 'com.github.hotchemi:permissionsdispatcher: 1.2.1@aar ' apt 'com.github.hotchemi:permissionsdispatcher-processor:1.2.1' }
The android-apt plugin will take care of annotation processing. After creating the project, you can use the generated class.
woley source share