トップページ > プログラム > 2015年01月24日 > HrOz2Rqw

書き込み順位&時間帯一覧

61 位/185 ID中時間01234567891011121314151617181920212223Total
書き込み数0000000000000000000001001



使用した名前一覧書き込んだスレッド一覧
デフォルトの名無しさん
Androidプログラミング質問スレ revision47 [転載禁止]©2ch.net

書き込みレス一覧

Androidプログラミング質問スレ revision47 [転載禁止]©2ch.net
16 :デフォルトの名無しさん[]:2015/01/24(土) 21:04:24.16 ID:HrOz2Rqw
自動ペアリングの者です。

Unhandled exception type InvocationTargetException

が出てきました。

http://www.coppermine.jp/docs/programming/2012/05/invocationtargetexception.html
http://kotacc.blogspot.jp/2011/11/invocationtargetexceptioncaused-by.html
http://qa.atmarkit.co.jp/q/124

を参考にしてみたのですが、メソッドでの例外が
発生している原因がわかりません。
どうすればいいでしょうか。

以下、ソースです
BluetoothDevice device = intent.getParcelableExtra("android.bluetooth.device.extra.DEVICE");
Method convert = device.getClass().getMethod("convertPinToBytes", String.class);
byte[] pin = (byte[]) convert.invoke(device, "1234");
Method setPin = device.getClass().getMethod("setPin", byte[].class);
Boolean success = (Boolean) setPin.invoke(device, pin);

全体に赤いエラーがでていて、
Description Resource Path Location Type
Unhandled exception type NoSuchMethodException DeviceListActivity.java /Copy of BluetoothChat4.4W_TEST/src/com/example/android/BluetoothChat line 203 Java Problem
Unhandled exception type IllegalAccessException DeviceListActivity.java /Copy of BluetoothChat4.4W_TEST/src/com/example/android/BluetoothChat line 204 Java Problem
Unhandled exception type IllegalAccessException DeviceListActivity.java /Copy of BluetoothChat4.4W_TEST/src/com/example/android/BluetoothChat line 202 Java Problem
Unhandled exception type InvocationTargetException DeviceListActivity.java /Copy of BluetoothChat4.4W_TEST/src/com/example/android/BluetoothChat line 202 Java Problem
Unhandled exception type InvocationTargetException DeviceListActivity.java /Copy of BluetoothChat4.4W_TEST/src/com/example/android/BluetoothChat line 204 Java Problem
Unhandled exception type NoSuchMethodException DeviceListActivity.java /Copy of BluetoothChat4.4W_TEST/src/com/example/android/BluetoothChat line 201 Java Problem
がでています。


※このページは、『2ちゃんねる』の書き込みを基に自動生成したものです。オリジナルはリンク先の2ちゃんねるの書き込みです。
※このサイトでオリジナルの書き込みについては対応できません。
※何か問題のある場合はメールをしてください。対応します。