HardBirch

【解决】Permission is only granted to system apps

时间:13-06-19 栏目:安卓技术篇 作者:魔豆先生 评论:0 点击: 15,487 次

问题描述:

manifest.xml文件中的修改permission的时候出现 “Permission is only granted to system apps” 的Error提示,无法消除掉

 

I have a System app that uses system permissions and I have those permissions listed in the manifest. Eclipse gives the following error when I try to make a build(command line build works):

Permission is only granted to system apps

I'm already aware that my app requires system permissions and it is not a problem for me because my application will be used only on rooted phones. So I want to suppress this error, anyone knows how?

【EDIT】
My project already compiles fine on command line, installs, runs etc.. My problem is about eclipse giving an error for a legit manifest file.

 

解决方案:

简单的处理的话,Clean一把!

深沉的原因 & 解决方案:

In Eclipse Studio:

Window -> Preferences -> Android -> Lint Error Checking.

In the list find an entry with ID = ProtectedPermission. Set the Severity to something lower than Error. This way you can still compile the project using Eclipse.

In Android Studio:

File -> Settings -> Inspections

Under Android Lint, locate Using system app permission. Either uncheck the checkbox or choose a Severity lower than Error.

 

 

声明: 本文由( 魔豆先生 )原创编译,转载请保留链接: 【解决】Permission is only granted to system apps

【解决】Permission is only granted to system apps:等您坐沙发呢!

发表评论


QQ群互动

Linux系统与内核学习群:194051772

WP建站技术学习交流群:194062106

魔豆之路QR

魔豆的Linux内核之路

魔豆的Linux内核之路

优秀工程师当看优秀书籍

优秀程序员,要看优秀书!

赞助商广告

友荐云推荐