Dear all:
I'm trying to put Bluetooth feature in Android. Now, I can use
hciconfig hcitool to inquiry and other things.
However, if I try to click Bluetooth settings in Wireless controls,
exception happens.
Using adb logcat, following are the log. The cause seems to be
E/AndroidRuntime( 1022): at
com.android.settings.bluetooth.BluetoothNameP
reference.setSummaryToName(BluetoothNamePreference.java:75)
By looking at BluetoothNamePreference.java,
-- code
private void setSummaryToName() {
BluetoothDevice manager = mLocalManager.getBluetoothManager();
if (manager.isEnabled()) {
setSummary(manager.getName());
}
}
--
line 75 shows manager is NULL. How does this happen? Or did I miss
anything?
Sincerely
----- log ---
I/ActivityManager( 587): Starting activity: Intent
{ action=android.intent.acti
on.MAIN comp={com.android.settings/
com.android.settings.bluetooth.BluetoothSetti
ngs} }
D/AndroidRuntime( 1022): Shutting down VM
W/dalvikvm( 1022): threadid=3: thread exiting with uncaught exception
(group=0x4
000fe70)
E/AndroidRuntime( 1022): Uncaught handler: thread main exiting due to
uncaught e
xception
E/AndroidRuntime( 1022): java.lang.RuntimeException: Unable to start
activity Co
mponentInfo{com.android.settings/
com.android.settings.bluetooth.BluetoothSetting
s}: android.view.InflateException: Binary XML file line #26: Error
inflating cla
ss java.lang.reflect.Constructor
E/AndroidRuntime( 1022): at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2268)
E/AndroidRuntime( 1022): at
android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2284)
E/AndroidRuntime( 1022): at android.app.ActivityThread.access
$1800(Activi
tyThread.java:112)
E/AndroidRuntime( 1022): at android.app.ActivityThread
$H.handleMessage(Ac
tivityThread.java:1692)
E/AndroidRuntime( 1022): at android.os.Handler.dispatchMessage
(Handler.ja
va:99)
E/AndroidRuntime( 1022): at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 1022): at android.app.ActivityThread.main
(ActivityThrea
d.java:3948)
E/AndroidRuntime( 1022): at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 1022): at java.lang.reflect.Method.invoke
(Method.java:5
21)
E/AndroidRuntime( 1022): at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:782)
E/AndroidRuntime( 1022): at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:540)
E/AndroidRuntime( 1022): at dalvik.system.NativeStart.main
(Native Method)
E/AndroidRuntime( 1022): Caused by: android.view.InflateException:
Binary XML fi
le line #26: Error inflating class java.lang.reflect.Constructor
E/AndroidRuntime( 1022): at
android.preference.GenericInflater.createItem
(GenericInflater.java:397)
E/AndroidRuntime( 1022): at
android.preference.GenericInflater.createItem
FromTag(GenericInflater.java:430)
E/AndroidRuntime( 1022): at
android.preference.GenericInflater.rInflate(G
enericInflater.java:481)
E/AndroidRuntime( 1022): at
android.preference.GenericInflater.inflate(Ge
nericInflater.java:326)
E/AndroidRuntime( 1022): at
android.preference.GenericInflater.inflate(Ge
nericInflater.java:263)
E/AndroidRuntime( 1022): at
android.preference.PreferenceManager.inflateF
romResource(PreferenceManager.java:250)
E/AndroidRuntime( 1022): at
android.preference.PreferenceActivity.addPref
erencesFromResource(PreferenceActivity.java:253)
E/AndroidRuntime( 1022): at
com.android.settings.bluetooth.BluetoothSetti
ngs.onCreate(BluetoothSettings.java:87)
E/AndroidRuntime( 1022): at
android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1123)
E/AndroidRuntime( 1022): at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2231)
E/AndroidRuntime( 1022): ... 11 more
E/AndroidRuntime( 1022): Caused by:
java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 1022): at
com.android.settings.bluetooth.BluetoothNameP
reference.<init>(BluetoothNamePreference.java:59)
E/AndroidRuntime( 1022): at
java.lang.reflect.Constructor.constructNative
(Native Method)
E/AndroidRuntime( 1022): at
java.lang.reflect.Constructor.newInstance(Con
structor.java:446)
E/AndroidRuntime( 1022): at
android.preference.GenericInflater.createItem
(GenericInflater.java:383)
E/AndroidRuntime( 1022): ... 20 more
E/AndroidRuntime( 1022): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 1022): at
com.android.settings.bluetooth.BluetoothNameP
reference.setSummaryToName(BluetoothNamePreference.java:75)
E/AndroidRuntime( 1022): ... 24 more
I/Process ( 587): Sending signal. PID: 1022 SIG: 3
I/dalvikvm( 1022): threadid=7: reacting to signal 3
E/ActivityThread( 587): Failed to find provider info for
android.server.checkin
E/Checkin ( 587): Error reporting crash:
java.lang.IllegalArgumentException: Un
known URL content://android.server.checkin/crashes
I/dalvikvm( 1022): Wrote stack trace to '/data/anr/traces.txt'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---