My app has added this permission , but in some device has this error message, all in android 4.4(4.4.2)
java.lang.SecurityException Neither user 10145 nor current process has android.permission.WAKE_LOCK.
If You Are Using Acra Library Check This Answer :
https://stackoverflow.com/a/50972790/7377631
Your app is probably using a new version of ACRA library. In new the version they added to the lib AndroidManifest.xml file. The android:maxSdkVersion="25" is silently merged to main app AndroidManifest.xml file, hence the app doesn't have WAKE_LOCK permission on Oreo devices. The solution is add tools:node="replace" to your uses-permission declaration.
For example <uses-permission android:name="android.permission.WAKE_LOCK" tools:node="replace"/>
.
Android permissions are case sensitive. So check whether you have added the permission correctly.
<uses-permission android:name="android.permission.WAKE_LOCK"/>
Also there is a known bug in Marshmallow. So try building by changing your targetsdk version is it is Android 6.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With