How to grant system permission

后端 未结 3 1899
盖世英雄少女心
盖世英雄少女心 2020-12-21 12:45

I am just trying to clear the app data and getting below error

java.lang.SecurityException: Neither user 10028 nor current process has 
android.permission.CL         


        
3条回答
  •  时光说笑
    2020-12-21 12:59

    You will not get that permission in a normal device unless you are developing system app. Refer to this article. You can add that to your manifest, adding this permission will not cause any compile error or warning. But it will simply not work in run time.

    By the way, if you really need to clear the data of your application, why don't you one by one clear the files/preferences you are generating from your application for purpose of "data"?

提交回复
热议问题