Using Cider on Android - android

I am trying to follow this tutorial on lein-droid-based Clojure development on Android. However, the tutorial skips on setting up Cider support.
I start with a default lein-droid project by adding
:user {:plugins [ [lein-droid "0.4.0-alpha4"] ]}
to my ~/.lein/profiles.clj, and then run
$ lein droid new android-hello com.example.android_hello
According to the tutorial, I should be able to do a lein droid doall and then connect with Cider to localhost:9999 at this point; however, it is unusable because of nREPL missing on the Android side:
; CIDER 0.9.1 (Java 0, Clojure 1.7.0-beta3-r2, nREPL nil)
WARNING: CIDER's version (0.9.1) does not match cider-nrepl's version (not installed)
So then, according to this other tutorial that I've found, I should add cider-nrepl to my Android dependencies by adding this to ~/.lein/profiles.clj:
:android-user {:plugins [[cider/cider-nrepl "0.9.1"]]
:android {:aot-exclude-ns ["cider.nrepl.middleware.util.java.parser"
"cider.nrepl" "cider-nrepl.plugin"]}}}
So I do a new lein clean; lein droid doall to make sure everything is picked up nicely; and now the resulting program crashes on Android at startup:
W/dalvikvm( 2508): Exception Ljava/lang/IllegalArgumentException; thrown while initializing Ldeps/cljfmt/v0v1v10/cljfmt/core__init;
W/dalvikvm( 2508): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcider/nrepl/middleware/format__init;
W/dalvikvm( 2508): threadid=10: thread exiting with uncaught exception (group=0xb5157180)
E/AndroidRuntime( 2508): FATAL EXCEPTION: ClojureLoadingThread
E/AndroidRuntime( 2508): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 2508): at java.lang.Class.classForName(Native Method)
E/AndroidRuntime( 2508): at java.lang.Class.forName(Class.java:217)
E/AndroidRuntime( 2508): at clojure.lang.RT.classForName(RT.java:2201)
E/AndroidRuntime( 2508): at clojure.lang.RT.classForName(RT.java:2210)
E/AndroidRuntime( 2508): at clojure.lang.RT.loadClassForName(RT.java:2229)
E/AndroidRuntime( 2508): at clojure.lang.RT.load(RT.java:461)
E/AndroidRuntime( 2508): at clojure.lang.RT.load(RT.java:437)
E/AndroidRuntime( 2508): at clojure.core$load$fn__5442.invoke(core.clj:5858)
E/AndroidRuntime( 2508): at clojure.core$load.doInvoke(core.clj:5857)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.invoke(RestFn.java:408)
E/AndroidRuntime( 2508): at clojure.core$load_one.invoke(core.clj:5663)
E/AndroidRuntime( 2508): at clojure.core$load_lib$fn__5391.invoke(core.clj:5703)
E/AndroidRuntime( 2508): at clojure.core$load_lib.doInvoke(core.clj:5702)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.applyTo(RestFn.java:142)
E/AndroidRuntime( 2508): at clojure.core$apply.invoke(core.clj:630)
E/AndroidRuntime( 2508): at clojure.core$load_libs.doInvoke(core.clj:5741)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.applyTo(RestFn.java:137)
E/AndroidRuntime( 2508): at clojure.core$apply.invoke(core.clj:630)
E/AndroidRuntime( 2508): at clojure.core$require.doInvoke(core.clj:5824)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.invoke(RestFn.java:408)
E/AndroidRuntime( 2508): at neko.tools.repl$start_repl$fn__6556$fn__6557.invoke(repl.clj:77)
E/AndroidRuntime( 2508): at clojure.core$map$fn__4547.invoke(core.clj:2616)
E/AndroidRuntime( 2508): at clojure.lang.LazySeq.sval(LazySeq.java:40)
E/AndroidRuntime( 2508): at clojure.lang.LazySeq.seq(LazySeq.java:49)
E/AndroidRuntime( 2508): at clojure.lang.RT.seq(RT.java:534)
E/AndroidRuntime( 2508): at clojure.core$seq__4122.invoke(core.clj:135)
E/AndroidRuntime( 2508): at clojure.core$apply.invoke(core.clj:628)
E/AndroidRuntime( 2508): at neko.tools.repl$start_repl$fn__6556.invoke(repl.clj:75)
E/AndroidRuntime( 2508): at clojure.core$with_redefs_fn.invoke(core.clj:7185)
E/AndroidRuntime( 2508): at neko.tools.repl$start_repl.doInvoke(repl.clj:72)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.applyTo(RestFn.java:139)
E/AndroidRuntime( 2508): at clojure.core$apply.invoke(core.clj:630)
E/AndroidRuntime( 2508): at neko.tools.repl$init.doInvoke(repl.clj:102)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.invoke(RestFn.java:397)
E/AndroidRuntime( 2508): at clojure.lang.Var.invoke(Var.java:375)
E/AndroidRuntime( 2508): at neko.App.loadClojure(App.java:40)
E/AndroidRuntime( 2508): at neko.App$1.run(App.java:51)
E/AndroidRuntime( 2508): at java.lang.Thread.run(Thread.java:856)
E/AndroidRuntime( 2508): Caused by: java.lang.ExceptionInInitializerError
E/AndroidRuntime( 2508): at java.lang.Class.classForName(Native Method)
E/AndroidRuntime( 2508): at java.lang.Class.forName(Class.java:217)
E/AndroidRuntime( 2508): at clojure.lang.RT.classForName(RT.java:2201)
E/AndroidRuntime( 2508): at clojure.lang.RT.classForName(RT.java:2210)
E/AndroidRuntime( 2508): at clojure.lang.RT.loadClassForName(RT.java:2229)
E/AndroidRuntime( 2508): at clojure.lang.RT.load(RT.java:461)
E/AndroidRuntime( 2508): at clojure.lang.RT.load(RT.java:437)
E/AndroidRuntime( 2508): at clojure.core$load$fn__5442.invoke(core.clj:5858)
E/AndroidRuntime( 2508): at clojure.core$load.doInvoke(core.clj:5857)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.invoke(RestFn.java:408)
E/AndroidRuntime( 2508): at clojure.core$load_one.invoke(core.clj:5663)
E/AndroidRuntime( 2508): at clojure.core$load_lib$fn__5391.invoke(core.clj:5703)
E/AndroidRuntime( 2508): at clojure.core$load_lib.doInvoke(core.clj:5702)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.applyTo(RestFn.java:142)
E/AndroidRuntime( 2508): at clojure.core$apply.invoke(core.clj:630)
E/AndroidRuntime( 2508): at clojure.core$load_libs.doInvoke(core.clj:5741)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.applyTo(RestFn.java:137)
E/AndroidRuntime( 2508): at clojure.core$apply.invoke(core.clj:630)
E/AndroidRuntime( 2508): at clojure.core$require.doInvoke(core.clj:5824)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.invoke(RestFn.java:703)
E/AndroidRuntime( 2508): at cider.nrepl.middleware.format$loading__5334__auto____6889.invoke(format.clj:1)
E/AndroidRuntime( 2508): at cider.nrepl.middleware.format__init.load(Unknown Source)
E/AndroidRuntime( 2508): at cider.nrepl.middleware.format__init.<clinit>(Unknown Source)
E/AndroidRuntime( 2508): ... 38 more
E/AndroidRuntime( 2508): Caused by: java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil
E/AndroidRuntime( 2508): at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:554)
E/AndroidRuntime( 2508): at clojure.java.io$fn__8970$G__8946__8977.invoke(io.clj:69)
E/AndroidRuntime( 2508): at clojure.java.io$reader.doInvoke(io.clj:102)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.invoke(RestFn.java:410)
E/AndroidRuntime( 2508): at clojure.lang.AFn.applyToHelper(AFn.java:154)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.applyTo(RestFn.java:132)
E/AndroidRuntime( 2508): at clojure.core$apply.invoke(core.clj:630)
E/AndroidRuntime( 2508): at clojure.core$slurp.doInvoke(core.clj:6645)
E/AndroidRuntime( 2508): at clojure.lang.RestFn.invoke(RestFn.java:410)
E/AndroidRuntime( 2508): at clojure.core$comp$fn__4489.invoke(core.clj:2432)
E/AndroidRuntime( 2508): at clojure.core$comp$fn__4489.invoke(core.clj:2432)
E/AndroidRuntime( 2508): at deps.cljfmt.v0v1v10.cljfmt.core__init.load(Unknown Source)
E/AndroidRuntime( 2508): at deps.cljfmt.v0v1v10.cljfmt.core__init.<clinit>(Unknown Source)
E/AndroidRuntime( 2508): ... 61 more
W/ActivityManager( 867): Force finishing activity hu.erdi.gergo.clojure_android_hello.debug/hu.erdi.gergo.clojure_android_hello.SplashActivity
W/WindowManager( 867): Failure taking screenshot for (180x300) to layer 21010
D/dalvikvm( 867): GC_CONCURRENT freed 561K, 13% free 11324K/12871K, paused 0ms+2ms
W/NetworkManagementSocketTagger( 867): setKernelCountSet(10041, 0) failed with errno -2

Seems you made a small mistake when following the tutorial you referenced above.
This:
:android-user {:plugins [[cider/cider-nrepl "0.9.1"]]
:android {:aot-exclude-ns ["cider.nrepl.middleware.util.java.parser"
"cider.nrepl" "cider-nrepl.plugin"]}}}
Should be:
:android-user {:dependencies [[cider/cider-nrepl "0.9.1"]]
:android {:aot-exclude-ns ["cider.nrepl.middleware.util.java.parser"
"cider.nrepl" "cider-nrepl.plugin"]}}

Related

Uncaught exception in Firebase Database runloop (20.0.6)

I get the following error stack trace when trying to navigate to a screen that uses Firebase Realtime Database for the second time after running the application on my android device.
java.lang.RuntimeException: Uncaught exception in Firebase Database runloop (20.0.6). If you are not already on the latest version of the Firebase SDKs, try updating your dependencies. Should this problem persist, please file a report at https://github.com/firebase/firebase-android-sdk
E/AndroidRuntime( 3934): at com.google.firebase.database.android.AndroidPlatform$1$1.run(AndroidPlatform.java:96)
E/AndroidRuntime( 3934): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 3934): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 3934): at android.os.Looper.loopOnce(Looper.java:210)
E/AndroidRuntime( 3934): at android.os.Looper.loop(Looper.java:299)
E/AndroidRuntime( 3934): at android.app.ActivityThread.main(ActivityThread.java:8168)
E/AndroidRuntime( 3934): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 3934): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
E/AndroidRuntime( 3934): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1037)
E/AndroidRuntime( 3934): Caused by: java.lang.RuntimeException: java.lang.AssertionError: hardAssert failed: listen() called twice for same QuerySpec.
E/AndroidRuntime( 3934): at com.google.firebase.database.core.persistence.NoopPersistenceManager.runInTransaction(NoopPersistenceManager.java:131)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.SyncTree.addEventRegistration(SyncTree.java:549)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.SyncTree.keepSynced(SyncTree.java:857)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.Repo.keepSynced(Repo.java:772)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.Repo.keepSynced(Repo.java:767)
E/AndroidRuntime( 3934): at com.google.firebase.database.Query$4.run(Query.java:267)
E/AndroidRuntime( 3934): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463)
E/AndroidRuntime( 3934): at java.util.concurrent.FutureTask.run(FutureTask.java:264)
E/AndroidRuntime( 3934): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
E/AndroidRuntime( 3934): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
E/AndroidRuntime( 3934): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
E/AndroidRuntime( 3934): at java.lang.Thread.run(Thread.java:1012)
E/AndroidRuntime( 3934): Caused by: java.lang.AssertionError: hardAssert failed: listen() called twice for same QuerySpec.
E/AndroidRuntime( 3934): at com.google.firebase.database.connection.ConnectionUtils.hardAssert(ConnectionUtils.java:67)
E/AndroidRuntime( 3934): at com.google.firebase.database.connection.PersistentConnectionImpl.listen(PersistentConnectionImpl.java:391)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.Repo$5.startListening(Repo.java:206)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.SyncTree.setupListener(SyncTree.java:918)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.SyncTree.access$1000(SyncTree.java:79)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.SyncTree$13.call(SyncTree.java:645)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.SyncTree$13.call(SyncTree.java:550)
E/AndroidRuntime( 3934): at com.google.firebase.database.core.persistence.NoopPersistenceManager.runInTransaction(NoopPersistenceManager.java:126)[1]][1]
My pubspec.yaml file:
My Flutter doctor output:

Android javafxports NullPointerException

I'm getting a force close crash on a small Android app I made for school using Javafxports.
Here is the code and APKs
And the logcat returns this exception:
E/AndroidRuntime( 4474): FATAL EXCEPTION: JavaFX Application Thread
E/AndroidRuntime( 4474): Process: com.julioqc.superflush, PID: 4474
E/AndroidRuntime( 4474): java.lang.NullPointerException
E/AndroidRuntime( 4474): at com.sun.glass.ui.monocle.MonocleWindowManager$1.run(MonocleWindowManager.java:179)
E/AndroidRuntime( 4474): at com.sun.javafx.application.PlatformImpl.lambda$null$155(PlatformImpl.java:295)
E/AndroidRuntime( 4474): at com.sun.javafx.application.PlatformImpl$$Lambda$19.run(Unknown Source)
E/AndroidRuntime( 4474): at java.security.AccessController.doPrivileged(AccessController.java:52)
E/AndroidRuntime( 4474): at com.sun.javafx.application.PlatformImpl.lambda$runLater$156(PlatformImpl.java:294)
E/AndroidRuntime( 4474): at com.sun.javafx.application.PlatformImpl$$Lambda$6.run(Unknown Source)
E/AndroidRuntime( 4474): at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
E/AndroidRuntime( 4474): at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
E/AndroidRuntime( 4474): at java.lang.Thread.run(Thread.java:841)
I/cm.log.servpro( 1334): [Privacy]/ com.google.android.googlequicksearchbox is not in contact list
W/ActivityManager( 726): Force finishing activity com.julioqc.superflush/javafxports.android.FXActivity
What is causing this error in my code??
EDIT: found out the issue is caused by some unsupported JavaFX 8 dialogs. Trying alternative.

Crash at startup on port to Cordova Crosswalk (Android)

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...

Navit Excepition:java.lang.ExceptionInInitializerError

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.

Unable to fill List Layout in App

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);

Categories

Resources