解决: java.lang.SecurityException: Neither user 10027 nor current process has android.permission.PACKAGE_USAGE_STATS. 问题: java.lang.SecurityException: Neither user 10027 nor current process has android.permission.PACKAGE_USAGE_STATS. 发生情况: 在调用UsageStats的时候,即android对应用程序点击次数以及运行时间的统计。 解决方式: 缺少系统权限:将Android.mk 中的 LOCAL_CERTIFICATE 定义为 platform。 或者 将打包好的apk,push到/system/app 下即可。