Android异常:唤醒锁未授权。(Caused by: java.lang.SecurityException: Neither user 10044 nor current process has android.permission.WAKE_LOCK.)

Android异常:Caused by: java.lang.SecurityException: Neither user 10044 nor current process has android.permission.WAKE_LOCK.

原因:未授权使用唤醒锁。

解决:在AndroidManifest.xml的<manifest>标签中加入:

<uses-permission android:name="android.permission.WAKE_LOCK"/>

顺便授权写SDCard:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

上一篇:Spring MVC注解入门


下一篇:pthread_cancel