I am trying to request permission to seek permission to read storage. After recent Android Studio upgrade, I started getting error 'Unfortunately, Package Installer has stopped' while requesting permission and the permission request dialog does not come up.

Unfortunately Google Has Stopped Android

When I turn it on after charging the Samsung logo and turns black and throws me a note: Unfortunately.application installer has stopped.

Android Emulator Unfortunately Has Stopped

Here is the code snippet where I am requesting the permission

AnanthAnanth

5 Answers

I had the same issue. I forgot to add same permissions in manifest. I added these permissions in manifest as well as mike said. Then clean and build and worked like a charm.

Conclusion: If you are giving the permissions programmatically in class then make sure the same permissions you must declare in AndroidManifest.xml file.

Däñish ShärmàDäñish Shärmà

I had tried this on 2 phones but no luck.

This time, I added the permissions back to manifest file, did clean project and ran again. It worked this time.

AnanthAnanth

I also had the same problem with Marshmallow, but running 'Build -> Clean Project' and then 'Build -> Rebuild Project' did not work. Then I tried 'File -> Invalidate Caches/Restart...' and that did get rid of the error.

Irving MoyIrving Moy

I also had the same problem. I was waste my whole day to find out its solution.

Please check the size of your app icon or other icon size used in your app. If your icon size is too big in that case this issue comes in my case.

Rahul SharmaRahul Sharma

Here is my case, I clicked on Deny on the permission request dialog more than thrice, now the permission request dialog itself not shown and it thrown Package installer stopped.

I went to app info screen -> Permissions -> enabled the permission manually, this worked for me.

Android emulator unfortunately has stopped

Also, clearing the app data worked.

whoamiwhoami

Not the answer you're looking for? Browse other questions tagged androidandroid-6.0-marshmallow or ask your own question.