I updated the library to 3.0.1 from 2.4.0 and now I'm seeing a Lint error saying "Useless @OnShowRationale declaration". It's not stopping me from compiling my code but I'm wondering why it's showing up because when I remove it, the function is no longer being used. Maybe it's because I'm checking for 2 permissions in the same Fragment?
I guess not for it to show up since it doesn't seem to be useless.
3.0.1
It's happening in this class
@silverAndroid Sorry for the late. It's kinda weird so let us investigate 馃檱
I see it too.
It's only show in Fragment in my project.
I have this problem:
@OnShowRationale(Manifest.permission.ACCESS_FINE_LOCATION)
void showRationaleForLocationPermission(PermissionRequest request) { }
@NeedsPermission(Manifest.permission.ACCESS_FINE_LOCATION)
void getLocationPermissionAndLaunchMarket() { }
I see this same warning for useless OnShowRationale. Using 3.1.0
@imminent, I was able to avoid the warning by swapping the order which those methods are declared.
Most helpful comment
@imminent, I was able to avoid the warning by swapping the order which those methods are declared.