I've an application in the market and many users have reported that the app is crashing a lot randomly. I'm trying to fix this but cannot fully understand the logs. Here's a extract from the log,
04-16 13:16:32.407 E/AndroidRuntime( 9237): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.maya.mobile.chiki/com.maya.mobile.chiki.tabview.Tabs3}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.maya.mobile.chiki/com.maya.mobile.chiki.featured.FeaturedView}: java.lang.ClassCastException: android.view.AbsSavedState$1
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.os.Handler.dispatchMessage(Handler.java:99)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.os.Looper.loop(Looper.java:123)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at java.lang.reflect.Method.invokeNative(Native Method)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at java.lang.reflect.Method.invoke(Method.java:521)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at dalvik.system.NativeStart.main(Native Method)
04-16 13:16:32.407 E/AndroidRuntime( 9237): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.maya.mobile.chiki/com.maya.mobile.chiki.featured.FeaturedView}: java.lang.ClassCastException: android.view.AbsSavedState$1
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.ActivityThread.startActivityNow(ActivityThread.java:2335)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:648)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.widget.TabHost.setCurrentTab(TabHost.java:320)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at com.maya.mobile.chiki.tabview.CustomTabHost.setCurrentTab(CustomTabHost.java:43)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.widget.TabHost.addTab(TabHost.java:213)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at com.maya.mobile.chiki.tabview.Tabs3.doCreateTabs(Tabs3.java:180)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at com.maya.mobile.chiki.tabview.Tabs3.onCreate(Tabs3.java:149)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
04-16 13:16:32.407 E/AndroidRuntime( 9237): ... 11 more
04-16 13:16:32.407 E/AndroidRuntime( 9237): Caused by: java.lang.ClassCastException: android.view.AbsSavedState$1
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.widget.AbsSpinner.onRestoreInstanceState(AbsSpinner.java:440)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.view.View.dispatchRestoreInstanceState(View.java:5940)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.view.ViewGroup.dispatchThawSelfOnly(ViewGroup.java:1140)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.widget.AdapterView.dispatchRestoreInstanceState(AdapterView.java:767)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1127)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1127)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1127)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1127)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.view.View.restoreHierarchyState(View.java:5919)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1454)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.Activity.onRestoreInstanceState(Activity.java:835)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.Activity.performRestoreInstanceState(Activity.java:807)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1096)
04-16 13:16:32.407 E/AndroidRuntime( 9237): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2473)
04-16 13:16:32.407 E/AndroidRuntime( 9237): ... 22 more
I got this log from one of my users.
Any help on this would be very very helpful.
Regards,
Hari
I was finally able to replicate this issue through an emulator set up with 50MB memory and running on GSM network speed. The issue seems to be because of history being cleared and so the data being lost which the app was already having. Not sure how I can handle this though.. any help???
My guess is that:
You have an activity containing a TabHost (fine)
The contents of those tabs are activities (bad)
You are duplicating android:id values among some of the widgets in those activities (fatal)
I had this issue as well. I had two activities with widgets bearing the same IDs. In one file, this widget was a Button and in another file the widget was a Spinner. I changed the IDs so that the Spinner had a different ID than the Button and the problem went away. It seems that Android runs in to problems if you use the same ID on two different classes of widgets.
I had a similar problem
It was a result of two views [Button] having the same ID
it happend to me because
the eclipse xml editor showed one button but registered 2 of the same ID
I solved it by cutting the button saving and then pasting it and saving again.
see: http://code.google.com/p/android/issues/detail?id=3981
Sometimes this happens to me.
First Try This:
Delete the R.java file so that it regenerates.
Then try this:
I rename the id of the widget in the XML, and in the java.
Then delete the R.java file so it regenerates.
Run it to flush it out. Rename it back to the way it was, and its good to go.
Related
I'm porting an existing android cordova app to cordova crosswalk.
Using cordova 4, crosswalk-cordova-10.39.235.9-x86 and Android SDK 19
The app crashes at startup with the following logs in logcat:
D/AndroidRuntime( 7208): Shutting down VM
W/dalvikvm( 7208): threadid=1: thread exiting with uncaught exception (group=0x41caeda0)
E/AndroidRuntime( 7208): FATAL EXCEPTION: main
E/AndroidRuntime( 7208): Process: myapp.cqa, PID: 7208
E/AndroidRuntime( 7208): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 7208): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:295)
E/AndroidRuntime( 7208): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:348)
E/AndroidRuntime( 7208): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:323)
E/AndroidRuntime( 7208): at myapp.cqa.CordovaApp.onCreate(CordovaApp.java:31)
E/AndroidRuntime( 7208): at android.app.Activity.performCreate(Activity.java:5451)
E/AndroidRuntime( 7208): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
E/AndroidRuntime( 7208): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2358)
E/AndroidRuntime( 7208): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2452)
E/AndroidRuntime( 7208): at android.app.ActivityThread.access$900(ActivityThread.java:172)
E/AndroidRuntime( 7208): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1302)
E/AndroidRuntime( 7208): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 7208): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 7208): at android.app.ActivityThread.main(ActivityThread.java:5586)
E/AndroidRuntime( 7208): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 7208): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 7208): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
E/AndroidRuntime( 7208): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
E/AndroidRuntime( 7208): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 7208): Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Use SharedXWalkView if you want to support shared mode
E/AndroidRuntime( 7208): at org.xwalk.core.ReflectionHelper.handleException(ReflectionHelper.java:233)
E/AndroidRuntime( 7208): at org.xwalk.core.ReflectionHelper.handleException(ReflectionHelper.java:237)
E/AndroidRuntime( 7208): at org.xwalk.core.ReflectionHelper.init(ReflectionHelper.java:132)
E/AndroidRuntime( 7208): at org.xwalk.core.ReflectionHelper.loadClass(ReflectionHelper.java:199)
E/AndroidRuntime( 7208): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:112)
E/AndroidRuntime( 7208): at org.apache.cordova.CordovaWebView.<clinit>(CordovaWebView.java:890)
E/AndroidRuntime( 7208): ... 18 more
E/AndroidRuntime( 7208): Caused by: java.lang.RuntimeException: Use SharedXWalkView if you want to support shared mode
E/AndroidRuntime( 7208): ... 23 more
Any idea why it crashes ?
OK, after a night of sleeping, I realized I was using x86 crosswalk instead of the ARM one. Sorry for the dumb issue post...
I have created an App with many list fragments in it. It works really fine. I have an main Application in which I want to merge the new list fragment app. I have included activity in Android manifest as well. Below is my Main Activity of ListFragment App, xml have three fragments and nothing else.
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ctx1 = getApplicationContext();
}
In my Main App I have several buttons, which launches different Activities on Click.
How do I launch my list fragment using one of the button.
I did use:
Intent listactivity= new Intent(MainActivity.this, TestListFragmentMain.class);
startActivity(listactivity);
But the above code gives me some inflating exceptions :(
Is there a easy way to do this?
Please reply
Trace Logs:
D/dalvikvm( 1478): GC_CONCURRENT freed 140K, 14% free 7493K/8707K, paused 13ms+0ms, total 76ms
D/AndroidRuntime( 1478): Shutting down VM
W/dalvikvm( 1478): threadid=1: thread exiting with uncaught exception (group=0xa631d288)
E/AndroidRuntime( 1478): FATAL EXCEPTION: main
E/AndroidRuntime( 1478): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.droidtv.TvPlayerFunctionalTestApp/org.droidtv.TvPlayerFunctionalTestApp.AndroidListFragmentActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
E/AndroidRuntime( 1478): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
E/AndroidRuntime( 1478): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
E/AndroidRuntime( 1478): at android.app.ActivityThread.access$600(ActivityThread.java:130)
E/AndroidRuntime( 1478): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
E/AndroidRuntime( 1478): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1478): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1478): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime( 1478): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1478): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 1478): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime( 1478): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 1478): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1478): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
E/AndroidRuntime( 1478): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
E/AndroidRuntime( 1478): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
E/AndroidRuntime( 1478): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
E/AndroidRuntime( 1478): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
E/AndroidRuntime( 1478): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
E/AndroidRuntime( 1478): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
E/AndroidRuntime( 1478): at android.app.Activity.setContentView(Activity.java:1952)
E/AndroidRuntime( 1478): at org.droidtv.TvPlayerFunctionalTestApp.AndroidListFragmentActivity.onCreate(AndroidListFragmentActivity.java:18)
E/AndroidRuntime( 1478): at android.app.Activity.performCreate(Activity.java:5098)
E/AndroidRuntime( 1478): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
E/AndroidRuntime( 1478): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
E/AndroidRuntime( 1478): ... 11 more
E/AndroidRuntime( 1478): Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment org.droidtv.VideoFeaturingTestApp.VideoFeaturingMainMenuClass: make sure class name exists, is public, and has an empty constructor that is public
E/AndroidRuntime( 1478): at android.support.v4.app.Fragment.instantiate(Fragment.java:401)
E/AndroidRuntime( 1478): at android.support.v4.app.Fragment.instantiate(Fragment.java:369)
E/AndroidRuntime( 1478): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:272)
E/AndroidRuntime( 1478): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
I might had missed a step , now when i did the whole thing again everything is working fine. Used normal Intent method to launch new activity
My appwidget crashes with following error:
E/AndroidRuntime( 5572): FATAL EXCEPTION: main
E/AndroidRuntime( 5572): java.lang.RuntimeException: Unable to start receiver com.android.mlweatherwidget.WeatherWidgetLarge: java.lang.RuntimeException: system server dead?
E/AndroidRuntime( 5572): at android.app.ActivityThread.handleReceiver(ActivityThread.java:1805)
E/AndroidRuntime( 5572): at android.app.ActivityThread.access$2400(ActivityThread.java:117)
E/AndroidRuntime( 5572): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:981)
E/AndroidRuntime( 5572): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 5572): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 5572): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 5572): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 5572): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 5572): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 5572): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 5572): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 5572): Caused by: java.lang.RuntimeException: system server dead?
E/AndroidRuntime( 5572): at com.android.mlhome.appwidget.AppWidgetManager.getAppWidgetIds(AppWidgetManager.java:375)
E/AndroidRuntime( 5572): at com.android.mlweatherwidget.WeatherWidgetLarge.onReceive(WeatherWidgetLarge.java:202)
E/AndroidRuntime( 5572): at android.app.ActivityThread.handleReceiver(ActivityThread.java:1794)
E/AndroidRuntime( 5572): ... 10 more
E/AndroidRuntime( 5572): Caused by: android.os.DeadObjectException
E/AndroidRuntime( 5572): at android.os.BinderProxy.transact(Native Method)
E/AndroidRuntime( 5572): at com.android.mlhome.appwidget.ILauncherAppWidget$Stub$Proxy.getAppWidgetIds(ILauncherAppWidget.java:256)
E/AndroidRuntime( 5572): at com.android.mlhome.appwidget.AppWidgetManager.getAppWidgetIds(AppWidgetManager.java:369)
E/AndroidRuntime( 5572): ... 12 more
Can anybody understand from the above log what exactly is causing this error?
How to fix android.os.DeadObjectException android X
this guy met the same issue, check this link out.
I copyed the answer written by Dimitar Dimitrov as follows
This means that your service had already stopped - either killed from
the OS, or stopped from your application.
Does this problem happen every time you debug your project?
Override your service's onDestroy() method and watch what event flow
leads to it. If you catch DeadObjectException without going through
this method, your service should have been killed by the OS.
While running the Navit code for car navigation, I am getting the following exception, i thought that navit library is not available. please any one help me.
E/AndroidRuntime( 365): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 365): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 365): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 365): at java.lang.Class.newInstance(Class.java:1472)
E/AndroidRuntime( 365): at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
E/AndroidRuntime( 365): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316)
E/AndroidRuntime( 365): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
E/AndroidRuntime( 365): at android.app.ActivityThread.access$2100(ActivityThread.java:116)
E/AndroidRuntime( 365): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
E/AndroidRuntime( 365): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 365): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 365): at android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime( 365): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 365): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 365): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime( 365): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime( 365): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 365): Caused by: java.lang.UnsatisfiedLinkError: Library navit not found
E/AndroidRuntime( 365): at java.lang.Runtime.loadLibrary(Runtime.java:489)
E/AndroidRuntime( 365): at java.lang.System.loadLibrary(System.java:557)
i downloaded the Navit code from , navit svn.ttps://navit.svn.sourceforge.net/svnroot/navit/trunk/navit But unable to run the code.
i want to run this code in Eclipse for Android Project.
You need to download Android NDK
Create standalong tools for your ARCH
Cross compile to ARM
Run make apkg
This error is due to missing libnavit.so.
Put libnavit.so it in /data/local
Change System.LoadLibrary to System.Load("/data/local/libnavit.so");
make apkg
Install
This exception should go away.
I'm attempting to write my first android app and am having a little
problem with filling a List Layout from a DB.
The project itself is here:
http://code.google.com/p/biofuelsfinder/
However the specific code I'm having the problem with is here:
public void fillData(String fueltype){
ArrayList<String> items = new ArrayList<String>();
Cursor retailers = biofuelsDB.getRetailers("b5");
/*while(!retailers.isAfterLast()){
retailers.moveToNext();
try{
items.add(retailers.getString(retailers.getColumnIndex("name")));
} catch(IllegalStateException e){
String msg = e.getMessage();
}
//items.add(user.lastName);
//items.add(user.country);
}*/
items.add("Blah1");
items.add("Blah2");
items.add("Blah3");
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
R.layout.retailers_row, items);
/*setListAdapter(adapter);*/
}
The two portions commented out, if run cause and illegalStateException
error which then aborts the code.
If anyone could have a look and let me know what I'm going wrong that
would be most appreciated.
Below is the stacktrace
W/dalvikvm( 208): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
E/AndroidRuntime( 208): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 208): java.lang.IllegalStateException: Could not execute method of the activity
E/AndroidRuntime( 208): at android.view.View$1.onClick(View.java:2031)
E/AndroidRuntime( 208): at android.view.View.performClick(View.java:2364)
E/AndroidRuntime( 208): at android.view.View.onTouchEvent(View.java:4179)
E/AndroidRuntime( 208): at android.widget.TextView.onTouchEvent(TextView.java:6532)
E/AndroidRuntime( 208): at android.view.View.dispatchTouchEvent(View.java:3709)
E/AndroidRuntime( 208): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime( 208): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime( 208): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime( 208): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime( 208): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
E/AndroidRuntime( 208): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
E/AndroidRuntime( 208): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
E/AndroidRuntime( 208): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
E/AndroidRuntime( 208): at android.view.ViewRoot.handleMessage(ViewRoot.java:1690)
E/AndroidRuntime( 208): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 208): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 208): at android.app.ActivityThread.main(ActivityThread.java:4310)
E/AndroidRuntime( 208): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 208): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 208): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 208): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 208): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 208): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 208): at com.biofuelsfinder.biofuelsfinder.buttonClickHandler(biofuelsfinder.java:37)
E/AndroidRuntime( 208): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 208): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 208): at android.view.View$1.onClick(View.java:2026)
E/AndroidRuntime( 208): ... 21 more
E/AndroidRuntime( 208): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 208): at com.biofuelsfinder.RetailerList.fillData(RetailerList.java:34)
E/AndroidRuntime( 208): ... 25 more
Thanks
I think your 'biofuelsDB' is still null!
Add this line after Arrayadapter:
ListView lv;
lv.setAdapter(items);