禁用依赖库权限 [英] Disable Dependency Library permission
问题描述
在我的android项目(使用Android Studio)中,我集成了一个库,该库在其清单文件中使用了很少的额外权限.我想删除它用于我的应用程序的权限之一,因为我没有从库中使用该功能,而这是我的应用程序不需要的权限.
In my android project (using Android Studio), I have integrated a library which uses few extra permissions in its Manifest file. I want to remove one of the permissions which it uses for my app as i don't use that feature from the library and it is unwanted permission for my app.
我阅读了有关标记选择器的信息,并尝试了它,但并未删除该许可.
I read about marker Selectors and tried it but it is not removing the permission.
这是我添加到我的应用清单文件中的内容:
This is what I added to my app manifest file:
<permission
android:name="android.permission.AUTHENTICATE_ACCOUNTS"
tools:node="remove" />
<permission
android:name="android.permission.MANAGE_ACCOUNTS"
tools:node="remove" />
但是在安装应用程序时,我仍然看到在设备上查找帐户"的权限.
But still while installing the app, I see the permission for "find accounts on the device" being asked.
有人可以告诉我我做错了什么还是我错过了什么吗?
can someone tell me what am I doing wrong or am I missing something?
我的应用清单显示在src/主目录中.
My app manifest is kept in src/main location.
我尝试了StackOverflow的其他答案,但它们并没有为我解决问题.
I tried other answers from StackOverflow but they did not solve the issue for me.
感谢您的帮助
推荐答案
将单词"permission"改为"uses-permission"对我来说解决了这个问题:
Changing word "permission" to "uses-permission" fixed the issue for me:
<uses-permission
android:name="android.permission.AUTHENTICATE_ACCOUNTS"
tools:node="remove" />
<uses-permission
android:name="android.permission.MANAGE_ACCOUNTS"
tools:node="remove" />
这篇关于禁用依赖库权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!