读取 CPU 使用率时出错:/proc/stat(权限被拒绝) [英] Error reading CPU usage: /proc/stat (permission denied)

查看:102
本文介绍了读取 CPU 使用率时出错:/proc/stat(权限被拒绝)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

附件是我在运行应用程序后出现在 Android Studio 中的错误消息.我能够在设备上构建和运行程序而不会出现任何问题.直到根据 Google 的新应用程序要求开始针对 API 级别 26 之前,我才收到此错误.有关如何修复错误的任何建议?另外,如果不解决这个错误,以后会不会出现问题?

Attached is my error message that comes up in Android Studio after running the application. I am able to build and run the program on a device without any issues. I was not getting this error until I started targeting API level 26 as per Google's new app requirements. Any suggestions on how to fix the error? Also, will this error cause issues in the future if not addressed?

谢谢!

推荐答案

使用 API 级别 26 或更高版本无法访问/proc/stat.Google 已将其限制为非系统应用程序.从 API 级别 26 开始,只有系统应用可以访问/proc/stat

Accessing /proc/stat not possible with the API Levels 26 or higher. Google has restricted this to non-system apps. From API Level 26 only system apps can access /proc/stat

更多信息https://issuetracker.google.com/issues/37140047

这篇关于读取 CPU 使用率时出错:/proc/stat(权限被拒绝)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆