java.lang.SecurityException:Android项目中需要BLUETOOTH权限错误

时间:2016-07-12 08:24:12

标签: java android android-studio bluetooth

07-12 16:15:49.169 20612-20675/? E/BluetoothAdapter: java.lang.SecurityException: Need BLUETOOTH permission: Neither user 10396 nor current process has android.permission.BLUETOOTH.
     at android.os.Parcel.readException(Parcel.java:1620)
     at android.os.Parcel.readException(Parcel.java:1573)
     at android.bluetooth.IBluetoothManager$Stub$Proxy.registerStateChangeCallback(IBluetoothManager.java:342)
     at android.bluetooth.BluetoothAdapter.<init>(BluetoothAdapter.java:594)
     at android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.java:576)
     at ru.mail.android.mytracker.providers.NetworkInfoDataProvider.collectData(SourceFile:90)
     at ru.mail.android.mytracker.providers.FingerprintDataProvider.collectData(SourceFile:92)
     at ru.mail.android.mytracker.async.commands.AbstractHttpCommand.execute(SourceFile:67)
     at ru.mail.android.mytracker.async.commands.TrackMajorEventsCommand.execute(SourceFile:117)
     at ru.mail.android.mytracker.async.commands.AbstractAsyncCommand.run(SourceFile:58)
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
     at java.lang.Thread.run(Thread.java:818)

当我在android studio中运行我的应用程序时,我的android项目显示异常。实际上我的应用程序没有使用BLUETOOTH。我可以知道为什么不使用BLUETOOTH显示这个错误吗?

0 个答案:

没有答案