guolindev / PermissionX

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

Unable Resolve The Lamba Expression In Android Java Project #276

Open hh-ahmad opened 10 months ago

hh-ahmad commented 10 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 });