permission?

Tags: 系統, 許可權,

在AndroidManifest.xml中使用瞭如下的配置:

就會報錯:Permission is only granted to system apps。原因是此類許可權僅授予系統級應用。

工具/原料

eclipse

方法/步驟

eclipse報錯:permission is only granted to system apps。如圖所示:

permission is only granted to system apps

依次點選選單windows–>perferences。如圖所示:

permission is only granted to system apps

展開“Android”選單,點選“Lint Error Checking”。找到ID = ProtectedPermission的選項並選擇,然後設定Serverity低於Error,比如Warning級別就好了。如圖所示:

permission is only granted to system apps

點選“OK”。如圖所示:

permission is only granted to system apps

這是彈出了一個對話方塊,點選“yes”即可!如圖所示:

permission is only granted to system apps

錯誤已經解決!!如圖所示:

permission is only granted to system apps

注意事項

不同版本的eclipse操作可能不一樣

相關問題答案