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

  • SEARCH
  • Home
  • 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 9259927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:46:21+00:00 2026-06-18T12:46:21+00:00

I want create my own Notepad, similar like in tutorial on Android site. When

  • 0

I want create my own Notepad, similar like in tutorial on Android site. When I try to run my application, Eclipse opens new tab – “activitythread.performlaunchactivity(activitythread$activityclientrecord intent) line: 2059” with statement “Source not found. Edit source lookup Path…”. There is my code:

package com.notatnik;

import android.annotation.SuppressLint;
import android.app.ListActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;

public class MainActivity extends ListActivity {

    private NotesDB mDB;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mDB = new NotesDB(this);
        mDB.open();
        fillData();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    public void saveNote(View view) {
        TextView textField = (TextView) findViewById(R.id.editText1);
        String note = textField.getText().toString();
        mDB.createNote(note);
    }

    @SuppressLint("NewApi")
    private void fillData() {
        Cursor cursor = mDB.fetchAllNotes();
        startManagingCursor(cursor);

        SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.item_list, cursor,
            new String[] {NotesDB.COLUMN_CONTENT}, new int[] {R.id.textView_content}, 0);
        ListView listView = (ListView) findViewById(R.id.list);
        listView.setAdapter(adapter);
    } 
}

Logcat:

    02-07 17:28:40.622: D/AndroidRuntime(2600): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-07 17:28:40.622: D/AndroidRuntime(2600): CheckJNI is ON
02-07 17:28:40.662: D/dalvikvm(2600): Trying to load lib libjavacore.so 0x0
02-07 17:28:40.672: D/dalvikvm(2600): Added shared lib libjavacore.so 0x0
02-07 17:28:40.702: D/dalvikvm(2600): Trying to load lib libnativehelper.so 0x0
02-07 17:28:40.702: D/dalvikvm(2600): Added shared lib libnativehelper.so 0x0
02-07 17:28:41.463: D/AndroidRuntime(2600): Calling main entry com.android.commands.pm.Pm
02-07 17:28:41.513: D/AndroidRuntime(2600): Shutting down VM
02-07 17:28:41.523: D/dalvikvm(2600): GC_CONCURRENT freed 101K, 78% free 466K/2048K, paused 1ms+2ms, total 14ms
02-07 17:28:41.523: D/dalvikvm(2600): Debugger has detached; object registry had 1 entries
02-07 17:28:42.152: D/AndroidRuntime(2613): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-07 17:28:42.152: D/AndroidRuntime(2613): CheckJNI is ON
02-07 17:28:42.203: D/dalvikvm(2613): Trying to load lib libjavacore.so 0x0
02-07 17:28:42.212: D/dalvikvm(2613): Added shared lib libjavacore.so 0x0
02-07 17:28:42.242: D/dalvikvm(2613): Trying to load lib libnativehelper.so 0x0
02-07 17:28:42.242: D/dalvikvm(2613): Added shared lib libnativehelper.so 0x0
02-07 17:28:43.113: D/AndroidRuntime(2613): Calling main entry com.android.commands.am.Am
02-07 17:28:43.153: I/ActivityManager(148): Force stopping package com.notatnik uid=10044
02-07 17:28:43.153: I/ActivityManager(148): Killing proc 2260:com.notatnik/u0a44: force stop
02-07 17:28:43.203: I/ActivityManager(148): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.notatnik/.MainActivity u=0} from pid 2613
02-07 17:28:43.334: D/dalvikvm(148): GC_FOR_ALLOC freed 260K, 9% free 11697K/12743K, paused 89ms, total 99ms
02-07 17:28:43.334: W/InputMethodManagerService(148): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@415cb158 attribute=null
02-07 17:28:43.422: D/AndroidRuntime(2613): Shutting down VM
02-07 17:28:43.422: D/dalvikvm(2632): Not late-enabling CheckJNI (already on)
02-07 17:28:43.442: D/dalvikvm(2613): GC_CONCURRENT freed 102K, 76% free 492K/2048K, paused 1ms+2ms, total 15ms
02-07 17:28:43.442: D/jdwp(2613): Got wake-up signal, bailing out of select
02-07 17:28:43.442: D/dalvikvm(2613): Debugger has detached; object registry had 1 entries
02-07 17:28:43.453: I/AndroidRuntime(2613): NOTE: attach of thread 'Binder_3' failed
02-07 17:28:43.472: I/ActivityManager(148): Start proc com.notatnik for activity com.notatnik/.MainActivity: pid=2632 uid=10044 gids={1028}
02-07 17:28:43.843: E/Trace(2632): error opening trace file: No such file or directory (2)
02-07 17:28:43.872: W/ActivityThread(2632): Application com.notatnik is waiting for the debugger on port 8100...
02-07 17:28:43.892: I/System.out(2632): Sending WAIT chunk
02-07 17:28:43.902: I/dalvikvm(2632): Debugger is active
02-07 17:28:44.092: I/System.out(2632): Debugger has connected
02-07 17:28:44.092: I/System.out(2632): waiting for debugger to settle...
02-07 17:28:44.293: I/System.out(2632): waiting for debugger to settle...
02-07 17:28:44.503: I/System.out(2632): waiting for debugger to settle...
02-07 17:28:44.703: I/System.out(2632): waiting for debugger to settle...
02-07 17:28:44.915: I/System.out(2632): waiting for debugger to settle...
02-07 17:28:45.125: I/System.out(2632): waiting for debugger to settle...
02-07 17:28:45.325: I/System.out(2632): waiting for debugger to settle...
02-07 17:28:45.569: I/System.out(2632): waiting for debugger to settle...
02-07 17:28:45.785: I/System.out(2632): debugger has settled (1452)
02-07 17:28:53.385: W/ActivityManager(148): Launch timeout has expired, giving up wake lock!
02-07 17:28:53.814: W/ActivityManager(148): Activity idle timeout for ActivityRecord{413ede80 com.notatnik/.MainActivity}
02-07 17:29:00.092: D/dalvikvm(2632): Debugger has detached; object registry had 312 entries
02-07 17:29:00.092: D/AndroidRuntime(2632): Shutting down VM
02-07 17:29:00.102: W/dalvikvm(2632): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
02-07 17:29:00.152: E/AndroidRuntime(2632): FATAL EXCEPTION: main
02-07 17:29:00.152: E/AndroidRuntime(2632): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.notatnik/com.notatnik.MainActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.ActivityThread.access$600(ActivityThread.java:130)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.os.Looper.loop(Looper.java:137)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.ActivityThread.main(ActivityThread.java:4745)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at java.lang.reflect.Method.invokeNative(Native Method)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at java.lang.reflect.Method.invoke(Method.java:511)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at dalvik.system.NativeStart.main(Native Method)
02-07 17:29:00.152: E/AndroidRuntime(2632): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.ListActivity.onContentChanged(ListActivity.java:243)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:259)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.Activity.setContentView(Activity.java:1867)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at com.notatnik.MainActivity.onCreate(MainActivity.java:20)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.Activity.performCreate(Activity.java:5008)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
02-07 17:29:00.152: E/AndroidRuntime(2632):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
02-07 17:29:00.152: E/AndroidRuntime(2632):     ... 11 more
02-07 17:29:00.232: W/ActivityManager(148):   Force finishing activity com.notatnik/.MainActivity
02-07 17:29:00.422: D/dalvikvm(148): GC_FOR_ALLOC freed 342K, 8% free 11758K/12743K, paused 100ms, total 115ms
02-07 17:29:00.986: W/ActivityManager(148): Activity pause timeout for ActivityRecord{413ede80 com.notatnik/.MainActivity}
02-07 17:29:01.263: W/EGL_emulation(279): eglSurfaceAttrib not implemented

I’ve not finished, but I think that this simple code should compile. I found out that the problem is SimpleCursorAdapter in fillData() method, but I don’t know what is wrong. I’m begging with programming for Android. Sorry for my bad english…

  • 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-18T12:46:22+00:00Added an answer on June 18, 2026 at 12:46 pm

    SOLVED

    The Cursor MUST include a column named _id or this class will not work.
    I changed the method fetchAllNotes() in NotesDB class:

    public Cursor fetchAllNotes () {
            return mDB.query(TABLE_NAME, new String[] {COLUMN_CONTENT}, null, null, null, null, null);
        }
    

    to

    public Cursor fetchAllNotes () {
                return mDB.query(TABLE_NAME, new String[] {_ID, COLUMN_CONTENT}, null, null, null, null, null);
            }
    

    Works. Thanks.

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

Sidebar

Related Questions

I want to create my own SeekBar because I can't find anything like with
I want to create my own node icons for jsTree application. A jsTree sample
I want to create my own custom config data in the application section of
I want to create my own systems for flash (like a scoreboard and made
I want users create their own account and users should get their own like
I want to create my own custom annotation (just like the Java style annotation)
I want to create my own event system in my windows application in c#.
I want to create My Own Portlet With the Eclipse JUNO for Liferay. I
I'm an iOS and Android developer and I want to create my own AR
I want to create own filetype to save objects in my app. Basically, I

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.