android – EBluetoothAdapter(883):蓝牙绑定器为空

android – EBluetoothAdapter(883):蓝牙绑定器为空,第1张

概述答案: How to use Bluetooth in Android emulator? 我试图启用禁用蓝牙设备.出于这个原因,我写了下面的代码,但它给出了错误,也在下面. if ( bluetoothAdmin == null ) { return ;}if ( bluetooth . isEnabled()){ bluetooth . disable ();}els 答案: How to use Bluetooth in Android emulator?

我试图启用禁用蓝牙设备.出于这个原因,我写了下面的代码,但它给出了错误,也在下面.

if ( bluetoothadmin == null ) {    return ;}if ( bluetooth . isEnabled()){    bluetooth . disable ();}else {    bluetooth . enable();}

在创造

BLuetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter() ;

在manisfest

<uses-permission    androID:name="androID.permission.BLUetoOTH" /><uses-permission    androID:name="androID.permission.BLUetoOTH_admin" />

错误:

01-23 07:18:53.167: E/BluetoothAdapter(883): Bluetooth binder is null

堆栈的一半:

01-23 07:36:55.624: E/SurfaceFlinger(36): ro.sf.lcd_density must be defined as a build property01-23 07:37:16.954: E/ActivityThread(642): Service com.androID.exchange.ExchangeService has leaked ServiceConnection com.androID.emailcommon.service.ServiceProxy$ProxyConnection@40d51230 that was originally bound here01-23 07:37:16.954: E/ActivityThread(642): androID.app.ServiceConnectionLeaked: Service com.androID.exchange.ExchangeService has leaked ServiceConnection com.androID.emailcommon.service.ServiceProxy$ProxyConnection@40d51230 that was originally bound here01-23 07:37:16.954: E/ActivityThread(642):  at androID.app.LoadedApk$Servicedispatcher.<init>(LoadedApk.java:969)01-23 07:37:16.954: E/ActivityThread(642):  at androID.app.LoadedApk.getServicedispatcher(LoadedApk.java:863)01-23 07:37:16.954: E/ActivityThread(642):  at androID.app.ContextImpl.bindService(ContextImpl.java:1418)01-23 07:37:16.954: E/ActivityThread(642):  at androID.app.ContextImpl.bindService(ContextImpl.java:1407)01-23 07:37:16.954: E/ActivityThread(642):  at androID.content.Contextwrapper.bindService(Contextwrapper.java:473)01-23 07:37:16.954: E/ActivityThread(642):  at com.androID.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)01-23 07:37:16.954: E/ActivityThread(642):  at com.androID.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)01-23 07:37:16.954: E/ActivityThread(642):  at com.androID.emailcommon.service.AccountServiceProxy.getdeviceid(AccountServiceProxy.java:11    6)01-23 07:37:16.954: E/ActivityThread(642):  at com.androID.exchange.ExchangeService.getdeviceid(ExchangeService.java:1249)01-23 07:37:16.954: E/ActivityThread(642):  at com.androID.exchange.ExchangeService.run(ExchangeService.java:1856)01-23 07:37:16.954: E/ActivityThread(642):  at com.androID.emailcommon.utility.Utility.doInBackground(Utility.java:551)01-23 07:37:16.954: E/ActivityThread(642):  at com.androID.emailcommon.utility.Utility.doInBackground(Utility.java:549)01-23 07:37:16.954: E/ActivityThread(642):  at androID.os.AsyncTask.call(AsyncTask.java:287)01-23 07:37:16.954: E/ActivityThread(642):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)01-23 07:37:16.954: E/ActivityThread(642):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)01-23 07:37:16.954: E/ActivityThread(642):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)01-23 07:37:16.954: E/ActivityThread(642):  at java.lang.Thread.run(Thread.java:856)01-23 07:37:16.964: E/StrictMode(642): null01-23 07:37:16.964: E/StrictMode(642): androID.app.ServiceConnectionLeaked: Service com.androID.exchange.ExchangeService has leaked ServiceConnection com.androID.emailcommon.service.ServiceProxy$ProxyConnection@40d51230 that was originally bound here

我在AndroID模拟器上测试

解决方法 模拟器不支持sdk的文档中提到的蓝牙.你必须在真实设备中检查这个..

你得到错误蓝牙绑定器是空的.这意味着模拟器没有蓝牙功能.

总结

以上是内存溢出为你收集整理的android – E / BluetoothAdapter(883):蓝牙绑定器为空全部内容,希望文章能够帮你解决android – E / BluetoothAdapter(883):蓝牙绑定器为空所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1128793.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存