Package Installer crashes in Android M after requesting permission READ_SMS

浪子不回头ぞ 提交于 2019-12-02 00:06:09

You've restricted the READ_SMS manifest permission to API 22 and below.

<uses-permission android:name="android.permission.READ_SMS" android:maxSdkVersion="22" />

As I mentioned in the comments, this manifest permission is still needed in Marshmallow and above, in addition to the runtime request. Remove the maxSdkVersion attribute from the permission element.

Declare permission in manifest like this:

<uses-permission android:name="android.permission.READ_SMS" />

Mind it, there is no maxSdkVersion attribute. Reference.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!