This repository was archived by the owner on Oct 3, 2024. It is now read-only.
This repository was archived by the owner on Oct 3, 2024. It is now read-only.
Crashing when showing rationale dialog #266
Open
Description
Basic Information
Device type: Nexus 5X on emulator
OS version: -
EasyPermissions version: 2.0.0
Describe the problem
I am using build tools 28.0.3 for a legacy application that uses Holo themes. When rationale dialog is to be shown (the second time I request permission after the first time it was denied) I get a crash "java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity."
The problem lies with RationaleDialogFragmentCompat
Code and logs
@AfterPermissionGranted(RC_LOCATION)
private void setMyLocationEnabled() {
String[] perms = {Manifest.permission.ACCESS_COARSE_LOCATION};
if (EasyPermissions.hasPermissions(getActivity(), perms)) {
try {
if (mMap != null)
mMap.setMyLocationEnabled(true);
} catch (SecurityException e) {
e.printStackTrace();
}
} else {
EasyPermissions.requestPermissions(this, getString(R.string.permission_rationale_location), RC_LOCATION, perms);
}
}