Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7729429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:57:57+00:00 2026-06-01T05:57:57+00:00

I’m using the following code to use a ListView in CustomAlertDialog Layout . public

  • 0

I’m using the following code to use a ListView in CustomAlertDialog Layout.

public void onButtonClicked(View v) {
    Toast.makeText(this,
            Messages.getString("OSListActivity.195"), Toast.LENGTH_SHORT).show(); //$NON-NLS-1$
    LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    View view = inflater.inflate(R.layout.buttondialog, null);
    AlertDialog.Builder builder = new AlertDialog.Builder(this);
    builder.setView(view);
    ListView mbListView = (ListView) view.findViewById(R.id.mblist);
    builder.setTitle(Messages.getString("OSListActivity.196"))
            .setNeutralButton(Messages.getString("OSListActivity.197"),
                    null);
    MatrixCursor dcursor = propmanager.propCursor();
    if (dcursor.moveToFirst()) {
        startManagingCursor(dcursor);
        String[] from = { "name", "value" };
        int[] to = { R.id.mbname, R.id.mbvalue };
        SimpleCursorAdapter dadapter = new SimpleCursorAdapter(this,
                R.layout.mblistrow, dcursor, from, to);
        mbListView.setAdapter(dadapter);
    }
    builder.show(); //$NON-NLS-1$ //$NON-NLS-2$
}

However I’m getting the following error. Why? What am I doing wrong here?

03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.view.View$PerformClick.run(View.java:14105)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.os.Handler.handleCallback(Handler.java:605)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.os.Handler.dispatchMessage(Handler.java:92)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.os.Looper.loop(Looper.java:137)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.app.ActivityThread.main(ActivityThread.java:4424)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at java.lang.reflect.Method.invokeNative(Native Method)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at java.lang.reflect.Method.invoke(Method.java:511)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at dalvik.system.NativeStart.main(Native Method)
03-30 18:45:50.867: E/AndroidRuntime(11170): Caused by: java.lang.reflect.InvocationTargetException
03-30 18:45:50.867: E/AndroidRuntime(11170):    at java.lang.reflect.Method.invokeNative(Native Method)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at java.lang.reflect.Method.invoke(Method.java:511)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.view.View$1.onClick(View.java:3039)
03-30 18:45:50.867: E/AndroidRuntime(11170):    ... 11 more
03-30 18:45:50.867: E/AndroidRuntime(11170): Caused by: java.lang.IllegalArgumentException: column '_id' does not exist
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.database.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:267)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.widget.CursorAdapter.init(CursorAdapter.java:168)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.widget.CursorAdapter.<init>(CursorAdapter.java:116)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.widget.ResourceCursorAdapter.<init>(ResourceCursorAdapter.java:52)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at android.widget.SimpleCursorAdapter.<init>(SimpleCursorAdapter.java:78)
03-30 18:45:50.867: E/AndroidRuntime(11170):    at com.manager.boot.free.MultiBootManager.onButtonClicked(MultiBootManager.java:103)
03-30 18:45:50.867: E/AndroidRuntime(11170):    ... 14 more
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:57:58+00:00Added an answer on June 1, 2026 at 5:57 am

    You are trying to use a cursor that requires a column called _id. Add a column (_id) in your table or include your primary key column in query as (yourColumn AS _id) to fix this issue. For more info

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.