SurfaceFlinger( 226): Permission Denial: can't access SurfaceFlinger

简介:

MODIFY_PHONE_STATE permission is granted to system apps only.

For your information, there are 2 types of Android apps: system & user

User apps are just all your normal app installations through the Google Play Store, Amazon Appstore or sideloading. These go into the /data partition of your Android phone, which is the part of the internal memory made available for user data and apps.

System apps are basically the apps that come pre-installed with your ROM. In a standard Android user environment, the user doesn’t have write access to the /system partition and thus, installing or uninstalling system apps directly isn’t possible.

In order to install an app as a system app on your Android device, your device must either be rooted or have a custom recovery installed (or both).

That being said, that error is actually wrong because you have a valid code and compilation should work. It would be better if it gave a warning instead. In Eclipse you can easily fix it. Just go to:

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

Find ProtectedPermission from the list and set the severity to something other than error(info for example). This way your project will still compile.

to ignore



本文转自wanqi博客园博客,原文链接:http://www.cnblogs.com/wanqieddy/p/4129077.html,如需转载请自行联系原作者


相关文章
|
Shell Android开发
解决Android的adb命令行报错Permission denied
解决Android的adb命令行报错Permission denied
1440 0
解决Android的adb命令行报错Permission denied
|
3月前
|
Java Android开发 UED
理解SurfaceFlinger在Android中的作用
理解SurfaceFlinger在Android中的作用
|
Android开发
Permission failure: android.permission.CAPTURE_AUDIO_OUTPUT 解决办法
Permission failure: android.permission.CAPTURE_AUDIO_OUTPUT 解决办法
378 0
|
存储 开发工具 Android开发
Android 11 上的文件读写权限(MANAGE_EXTERNAL_STORAGE)
Android 11 上的文件读写权限(MANAGE_EXTERNAL_STORAGE)
1723 0
Android 11 上的文件读写权限(MANAGE_EXTERNAL_STORAGE)
|
Android开发
解决安卓的permission denied for this window type问题
解决安卓的permission denied for this window type问题
282 0
|
Java Android开发 安全
解决android.permission.WRITE_APN_SETTINGS
版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/chaoyu168/article/details/51555326 在ICS40以前的版本中,如果程序需要设置APN,只需要在AndroidManifest文件中声明这个权限即可。
1525 0
|
Android开发 Kotlin
【错误记录】Android Studio 运行报错 ( There is not enough memory to perform the requested operation. )
【错误记录】Android Studio 运行报错 ( There is not enough memory to perform the requested operation. )
663 0
【错误记录】Android Studio 运行报错 ( There is not enough memory to perform the requested operation. )
|
Android开发
【错误记录】前台进程报错 ( Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE )
【错误记录】前台进程报错 ( Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE )
585 0
【错误记录】前台进程报错 ( Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE )
|
容器
【错误记录】Flutter 界面跳转报错 ( Navigator operation requested with a context that does not include a Naviga )
【错误记录】Flutter 界面跳转报错 ( Navigator operation requested with a context that does not include a Naviga )
515 0
【错误记录】Flutter 界面跳转报错 ( Navigator operation requested with a context that does not include a Naviga )