Android AVD Bluetooth Activation Problem
By default Bluetooth is not enabled in Android. But when I go to Setting > Wireless & network and I click on Bluetooth Settings I get the following error:
04-04 11:42:22.492: WARN/dalvikvm(747): threadid=1: thread exiting with uncaught exception (group=0x40014760) FATAL EXCEPTION: main android.view.InflateException: Binary XML file line #29: Error inflating class java.lang.reflect.Constructor at android.preference.GenericInflater.createItem(GenericInflater.java:397) at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:430) at android.preference.GenericInflater.rInflate(GenericInflater.java:481) at android.preference.GenericInflater.inflate(GenericInflater.java:326) at android.preference.GenericInflater.inflate(GenericInflater.java:263)开发者_高级运维 at android.preference. PreferenceManager.inflateFromResource(PreferenceManager.java:269) at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:271) at com.android.settings.bluetooth.BluetoothSettings.addPreferencesForActivity(BluetoothSettings.java:53) at com.android.settings.bluetooth.DeviceListPreferenceFragment.onActivityCreated(DeviceListPreferenceFragment.java:93) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:749) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:921) at android.app.BackStackRecord.run(BackStackRecord.java:578) at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1221) at android.app.FragmentManagerImpl$1.run(FragmentManager.java:375) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:126) at android.app.ActivityThread.main(ActivityThread.java:3997) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:491) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:417) at android.preference.GenericInflater.createItem(GenericInflater.java:383) ... 22 more Caused by: java.lang.NullPointerException at com.android.settings.bluetooth.BluetoothNamePreference.setSummaryToName(BluetoothNamePreference.java:101) at com.android.settings.bluetooth.BluetoothNamePreference.(BluetoothNamePreference.java:66) ... 25 more
What I'm missing?
Thanks.
You cant setup bluetooth on ANdroid AVD. Please check this link for emulator limitations:
http://developer.android.com/guide/developing/devices/emulator.html
精彩评论