opening google map in a tab in android not working - android

I'm trying to open a google map application I did in a tab but its not working, it keep getting the force close message when I run it. I created the main activity file[TabtestingActivity] which creates the tabs [HelloGoogleActivity class contains the map code and it works fine without tabs]
public class TabstestingActivity extends TabActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Resources res = getResources();
TabHost tabHost = getTabHost(); // The activity TabHost
TabHost.TabSpec spec; // Reusable TabSpec for each tab
Intent intent; // Reusable Intent for each tab
intent = new Intent().setClass(this, HelloGoogleActivity.class);
spec = tabHost.newTabSpec("tabOne");
spec.setContent(intent);
spec.setIndicator("Tab One",res.getDrawable(R.drawable.tabselect));
tabHost.addTab(spec);
tabHost.setCurrentTab(0);
}
}
if I create a class which only has a text in it it works fine with tabs but when I add the map class it stops working.
This is my main.xml:
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TabWidget
android:id="#android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="#android:id/tabcontent
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="#+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="my key"
android:layout_weight="1"/>
</RelativeLayout>
</FrameLayout>
</LinearLayout>
</TabHost>
is there any problem with my main.xml?
This is the logcat:
10-26 00:47:10.207: ERROR/AndroidRuntime(303): FATAL EXCEPTION: main
10-26 00:47:10.207: ERROR/AndroidRuntime(303): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tabtest/com.example.tabtest.TabstestingActivity}: android.view.InflateException: Binary XML file line #12: Error inflating class com.google.android.maps.MapView
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.os.Handler.dispatchMessage(Handler.java:99)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.os.Looper.loop(Looper.java:123)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.app.ActivityThread.main(ActivityThread.java:4627)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at java.lang.reflect.Method.invokeNative(Native Method)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at java.lang.reflect.Method.invoke(Method.java:521)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at dalvik.system.NativeStart.main(Native Method)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): Caused by: android.view.InflateException: Binary XML file line #12: Error inflating class com.google.android.maps.MapView
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.app.Activity.setContentView(Activity.java:1647)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at com.example.tabtest.TabstestingActivity.onCreate(TabstestingActivity.java:15)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): ... 11 more
10-26 00:47:10.207: ERROR/AndroidRuntime(303): Caused by: java.lang.reflect.InvocationTargetException
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at com.google.android.maps.MapView.<init>(MapView.java:238)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at java.lang.reflect.Constructor.constructNative(Native Method)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): ... 22 more
10-26 00:47:10.207: ERROR/AndroidRuntime(303): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at com.google.android.maps.MapView.<init>(MapView.java:282)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): at com.google.android.maps.MapView.<init>(MapView.java:255)
10-26 00:47:10.207: ERROR/AndroidRuntime(303): ... 26 more

The trace is pretty clear,
"10-26 00:47:10.207: ERROR/AndroidRuntime(303): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity."
You can't use the MapView outside of a MapActivity.

Related

Eclipse android LogCat: GCMRegistrar: saving regId on app error

I can not figure this out, in one of my test apps I get an error when closing the app.
In LogCat I see the handleRegistration long code as ok, in blue text but some lines futher after saving regId on app the registration code is in red text.
Someone know why?
In another app, at the same emulator, it does not happen but I can not find the solution.
EDIT
You are right, sorry, this is LogCat output:
10-26 12:22:11.383: I/dalvikvm(754): threadid=3: reacting to signal 3
10-26 12:22:11.539: I/dalvikvm(754): Wrote stack traces to '/data/anr/traces.txt'
10-26 12:22:11.644: I/dalvikvm(754): threadid=3: reacting to signal 3
10-26 12:22:11.718: I/dalvikvm(754): Wrote stack traces to '/data/anr/traces.txt'
10-26 12:22:11.873: D/GCMRegistrar(754): resetting backoff for nl.easy.gcmnotification
10-26 12:22:11.883: V/GCMRegistrar(754): Registering app nl.easy.gcmnotification of senders 182xxxxxx601
10-26 12:22:12.153: I/dalvikvm(754): threadid=3: reacting to signal 3
10-26 12:22:12.163: I/dalvikvm(754): Wrote stack traces to '/data/anr/traces.txt'
10-26 12:22:12.445: D/gralloc_goldfish(754): Emulator without GPU emulation detected.
10-26 12:22:13.843: V/GCMBroadcastReceiver(754): onReceive:
com.google.android.c2dm.intent.REGISTRATION
10-26 12:22:13.843: V/GCMBroadcastReceiver(754): GCM IntentService class: nl.easy.gcmnotification.GCMIntentService
10-26 12:22:13.853: V/GCMBaseIntentService(754): Acquiring wakelock
10-26 12:22:13.864: V/GCMBaseIntentService(754): Intent service name: GCMIntentService-182537982601-1
10-26 12:22:13.953: E/GCMRegistrar(754): internal error: retry receiver class not set yet
10-26 12:22:13.953: V/GCMRegistrar(754): Registering receiver
10-26 12:22:13.953: D/GCMBaseIntentService(754): handleRegistration: registrationId = APAxxxxxx8Kg, error = null, unregistered = null (IN COLOR BLUE)
10-26 12:22:13.953: D/GCMRegistrar(754): resetting backoff for nl.easy.gcmnotification
10-26 12:22:13.964: V/GCMRegistrar(754): Saving regId on app version 1
10-26 12:22:13.973: E/(754): registration id : APAxxxxxx8Kg (IN COLOR RED)
10-26 12:22:13.973: V/GCMBaseIntentService(754): Releasing wakelock
(WHEN SHUTTING DOWN APP)
10-26 12:22:35.033: V/GCMRegistrar(754): Unregistering receiver
10-26 12:22:35.033: D/AndroidRuntime(754): Shutting down VM
10-26 12:22:35.033: W/dalvikvm(754): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
10-26 12:22:35.155: E/AndroidRuntime(754): FATAL EXCEPTION: main
10-26 12:22:35.155: E/AndroidRuntime(754): java.lang.RuntimeException: Unable to destroy activity {nl.easy.gcmnotification/nl.easy.gcmnotification.MainActivity}: java.lang.IllegalArgumentException: Receiver not registered: com.google.android.gcm.GCMBroadcastReceiver#412bc5c0
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3112)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3130)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.ActivityThread.access$1200(ActivityThread.java:123)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1180)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.os.Handler.dispatchMessage(Handler.java:99)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.os.Looper.loop(Looper.java:137)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-26 12:22:35.155: E/AndroidRuntime(754): at java.lang.reflect.Method.invokeNative(Native Method)
10-26 12:22:35.155: E/AndroidRuntime(754): at java.lang.reflect.Method.invoke(Method.java:511)
10-26 12:22:35.155: E/AndroidRuntime(754): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-26 12:22:35.155: E/AndroidRuntime(754): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-26 12:22:35.155: E/AndroidRuntime(754): at dalvik.system.NativeStart.main(Native Method)
10-26 12:22:35.155: E/AndroidRuntime(754): Caused by: java.lang.IllegalArgumentException: Receiver not registered: com.google.android.gcm.GCMBroadcastReceiver#412bc5c0
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:628)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1066)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:354)
10-26 12:22:35.155: E/AndroidRuntime(754): at com.google.android.gcm.GCMRegistrar.onDestroy(GCMRegistrar.java:266)
10-26 12:22:35.155: E/AndroidRuntime(754): at nl.easy.gcmnotification.MainActivity.onDestroy(MainActivity.java:49)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.Activity.performDestroy(Activity.java:4629)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1079)
10-26 12:22:35.155: E/AndroidRuntime(754): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3099)
10-26 12:22:35.155: E/AndroidRuntime(754): ... 11 more
Can you post the code used for destroying the activity ?
I think your problem is the same as this one :
GCMRegistrar.onDestroy(context) crashing, Receiver not registered
Another potential issue : Did you declare the service in your manifest ?
The problem is fixed by restarting eclipse and clean/rebuild the project... Strange but true!

following exception in android simulator 2.0

i got following strange exception on only andorid simulator 2.0
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.markupartist.android.example.pulltorefresh/com.markupartist.android.example.pulltorefresh.PullToRefreshActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class com.markupartist.android.widget.PullToRefreshListView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class com.markupartist.android.widget.PullToRefreshListView
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
at android.app.Activity.setContentView(Activity.java:1647)
at com.markupartist.android.example.pulltorefresh.PullToRefreshActivity.onCreate(PullToRefresh Activity.java:21)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at com.markupartist.android.widget.PullToRefreshListView. (PullToRefreshListView.java:54)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 21 more
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030002
at android.content.res.Resources.getValue(Resources.java:892)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:1869)
at android.content.res.Resources.getLayout(Resources.java:731)
at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.markupartist.android.widget.PullToRefreshListView.init(PullToRefreshListView.java:80)
... 25 more
when i tested on andorid 1.6 , 2.01,2.1,2.2,2.3 ,4.0 it works completely,
is this a simulator bug of 2.0
please give me some information about this
Thanks

OPEN FEINT error in Android App

15 reports
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.oas.fruitkungfufree/com.openfeint.internal.ui.IntroFlow}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.openfeint.internal.Util.setOrientation(Util.java:36)
at com.openfeint.internal.ui.NestedWindow.onCreate(NestedWindow.java:32)
at com.openfeint.internal.ui.WebNav.onCreate(WebNav.java:93)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
Does any one have a solution for this??
This is a problem with your code, you can't use an object that is null. This is a hint.

Problem with Stack traces in android market

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.falling.inairproandmark/com.falling.inairproandmark.Q9Popup}: android.view.InflateException: Binary XML file line #9: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:513)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:219)
at android.app.Activity.setContentView(Activity.java:1647)
at com.falling.inairproandmark.Q9Popup.onCreate(Q9Popup.java:36)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at android.widget.Button.<init>(Button.java:65)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
at android.view.LayoutInflater.createView(LayoutInflater.java:500)
... 22 more
Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:468)
at android.graphics.Bitmap.createBitmap(Bitmap.java:435)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340)
at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
at android.content.res.Resources.loadDrawable(Resources.java:1709)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.view.View.<init>(View.java:1885)
at android.widget.TextView.<init>(TextView.java:352)
at android.widget.Button.<init>(Button.java:69)
... 26 more
==
here's my xml layout:
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:background="#drawable/q9popup" android:id="#+id/qnine"
android:layout_width="fill_parent" android:layout_height="fill_parent">
</Button>
<com.google.ads.AdView android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="**********"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/>
</AbsoluteLayout>
I don't understand why I keep getting this error :S
Please help.
Thanks
Android cannot allocate the memory for the Button. Pre-Honeycomb allocates the memory for a bitmap natively, outside the Dalvik VM, using malloc and has to rely on Java finalizers to free that memory again. Unless you call Bitmap.recycle that is.
See http://www.youtube.com/watch?v=_CruQY55HOk&feature=player_detailpage#t=650s for some info on allocation of Bitmaps.
So you have to figure out why external allocation is so high in your app. Maybe AdMob is the cause. Make sure to invoke AdView.destroy in your activity's onDestroy.

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

Categories

Resources