2011-07-10 25 views
0

我在我的桌面窗口上運行我的服務器藍牙,並且出現RuntimeException:Stub!當我啓動它時;BluetoothAdapter.getDefaultAdapter()throw RuntimeException:Stub!

Excactly當我打電話時:BluetoothAdapter.getDefaultAdapter()代碼停止!

任何人都知道藍牙適配器用於桌面藍牙服務的任何其他類?

+0

這是同樣的問題,一些解決方案: http://stackoverflow.com/questions/5920578/bluetoothadapter-getdefault-throwing-runtimeexception-while-not-in-activity –

回答

1

我假設你在模擬器中運行:我不相信模擬器有藍牙工作的實現,這就是爲什麼你會得到存根異常。

據我所知目前沒有辦法在模擬器中運行藍牙功能:您將不得不使用設備。

+0

如果仿真器不會有藍牙,getDefaultAdapter()應該返回null。 – mDroidd