收到连接更改广播意图时我的应用程序崩溃

时间:2018-09-10 14:29:46

标签: android mqtt android-wake-lock aws-appsync

我正在使用AWS AppSync服务,该服务使用Mqtt Service library

在Android 8(Google Pixel)上,当我启动该应用程序时,它崩溃了:

java.lang.RuntimeException: Error receiving broadcast Intent 
{ act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } 
in org.eclipse.paho.android.service.MqttService$NetworkConnectionIntentReceiver@fdb4f10
...
Caused by: java.lang.SecurityException: Neither user 10548 
nor current process has android.permission.WAKE_LOCK.

这很奇怪,因为清单中我有那个权限:

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

有人遇到过同样的问题吗?

0 个答案:

没有答案
相关问题