代码改变世界

[Android Tips] 31.如何将第三库引入的 Permission 删除掉

2018-04-16 15:14  shaobin0604  阅读(850)  评论(0编辑  收藏  举报

Just declare the incriminated permission in your (main) Manifest with the

tools:node="remove"

attribute (yes, that’s exactly how we fixed it).
For example:

<uses-permission android:name=”android.permission.RECORD_AUDIO” tools:node=”remove” />

Even if another library is asking for this specific permission, the build will be forced to not merge it in your final Manifest file.

参考