java.lang.ClassCastException

java.lang.String cannot be cast to android.database.Cursor

Solutions on the web19441

  • java.lang.String cannot be cast to android.database.Cursor
  • java.lang.String cannot be cast to android.database.Cursor
  • via Stack Overflow by Unknown author, 1 year ago
    com.mlaffan.giftpal.sqlite.db.Person cannot be cast to android.database.Cursor
  • Stack trace

    • java.lang.ClassCastException: java.lang.String cannot be cast to android.database.Cursor at com.example.azharwa.studentattendance.LecturerSearch$2.onItemClick(LecturerSearch.java:69) at android.widget.AdapterView.performItemClick(AdapterView.java:300) at android.widget.AbsListView.performItemClick(AbsListView.java:1143) at android.widget.AbsListView$PerformClick.run(AbsListView.java:3044) at android.widget.AbsListView.onTouchUp(AbsListView.java:3845) at android.widget.AbsListView.onTouchEvent(AbsListView.java:3617) at android.view.View.dispatchTouchEvent(View.java:8388) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2424) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2158) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2430) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2314) at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1692) at android.app.Activity.dispatchTouchEvent(Activity.java:2739) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2275) at android.view.View.dispatchPointerEvent(View.java:8578) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4021) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3887) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3502) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3468) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3578) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3476) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3635) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3502) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3468) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3476) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3449) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5701) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5675) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5646) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5791) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:143) at android.os.Looper.loop(Looper.java:122) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.