[問題] BluetoothChat sample 閃退?
請問一下各位大大
為什麼我是用 android 的 BluetoothChat sample code
當載到手機之後開啟就會crash
有上網找過,發現還是無法解決... 手機版本為 4.0.3
以下為目前的code
https://www.dropbox.com/sh/fqhhaufz3c776m0/AACgzFcaAMWKSlvHKxQS1jzVa?dl=0
謝謝各位@@
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.117.176.202
※ 文章網址: http://www.ptt.cc/bbs/AndroidDev/M.1416938067.A.A2C.html
推
11/26 18:04, , 1F
11/26 18:04, 1F
→
11/26 18:55, , 2F
11/26 18:55, 2F
→
11/26 18:55, , 3F
11/26 18:55, 3F
目前前面文章,解決閃退問題了,但是... 一開起來不是閃退而是
"很抱歉 bluetooth 已停止",查了一下好像是"版本問題",但我的min設15,max設18
理論上是沒問題阿QAQ
我已經試過超多組的了,連target也有設還是不行... 真心覺得android好腦人阿QQ
PS : 手機說需要更新,請問有無更新有差嗎@@?
code已更新
→
11/27 15:00, , 4F
11/27 15:00, 4F
恩恩,解決嚕
提供給以後的人參考,主要是改 BluetoothChat.java 的
public void onCreate(Bundle savedInstanceState)
這邊他官方的有點問題
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
這行應改為 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
就OK嚕
※ 編輯: nsysukober (140.117.176.202), 11/27/2014 20:28:12