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” />

    原文作者:java锁
    原文地址: https://www.cnblogs.com/godwithus/p/5542231.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞