guolindev / PermissionX

An open source Android library that makes handling runtime permissions extremely easy.
Apache License 2.0
3.34k stars 386 forks source link

Unable Resolve The Lamba Expression In Android Java Project #276

Open hh-ahmad opened 3 months ago

hh-ahmad commented 3 months ago

I have to use this PermissionX library in Android Java Project, in my java Activity.

PermissionX.init(this)
                .permissions(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION)
                .request((b, list1, list2) -> {
                    if (b) {
                    } else {
                    });

The following error encountered while writing the above mentioned code:

error: ';' expected .request(b, list1, list2) ->{ and

error: illegal start of expression });