permissions-dispatcher / PermissionsDispatcher

A declarative API to handle Android runtime permissions.
https://github.com/permissions-dispatcher/PermissionsDispatcher
Apache License 2.0
11.22k stars 1.44k forks source link

Inside module permissionDispatcher 4.x not generate xxxPermissionsDispatcher file. #617

Closed cuichanghao closed 5 years ago

cuichanghao commented 5 years ago

when i upgrade to 4.3.1 permissionDispatcher not work. previously i use 3.2.0 like below, and not problem.

api project(path: ':<myLibrary>')

this project is mix kotlin and java code. and use androidx.appcompat:appcompat:1.0.0

but when i changed to 4.3.1 it's occur build error and not generate xxxPermissionsDispatcher file. after clear cache, invalidate caches/restart the same error.

Unresolved reference: onStorageWithPermissionCheck
No value passed for parameter 'grantResults'

also when i create new project 4.3.1 work correctlly.

cuichanghao commented 5 years ago

may be my gradle repositories order problme.

https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/560

below is work. change jcenter() locatiion to very bottom.

buildscript {
    apply from: 'versions.gradle'

    repositories {
        google()
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://plugins.gradle.org/m2/'}
        jcenter()
    }
......
.....

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
        jcenter()
    }
}