消除“Permission is only granted to system apps”錯誤


from://http://blog.csdn.net/gaojinshan/article/details/14230673

在AndroidManifest.xml中使用了如下的配置:
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />

就會報錯:Permission is only granted to system apps

原因如下:
此類權限僅授予系統級應用,可以修改下Link Error Checking項的安全級別;
In Eclipse: Window -> Preferences -> Android -> Lint Error Checking
在ID列表中,找到ID = ProtectedPermission,設置Serverity低於Error,比如Warning級別就好了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM