[Solved] - Run-time error in NotepadV1

Put your problem here if it does not fit any of the other categories.

[Solved] - Run-time error in NotepadV1

Postby Fx » Thu Nov 22, 2007 11:28 pm

Hi All,

Imported the solution for exercise NotePadV1 project into Eclipse then run. In the emulator I got:

Application Error: com.google.android...

An eeror has occurred in process com.google.android.demo.notepad1. Unable to satrt activity

ComponentInfo{com.google.android.demo.notepad1/com.google.android.demo.notepad1.Notepadv1}: java.lang.RuntimeException; Your content must have a ListView whose id attribute is 'android.R.id.list'.

FORCE QUIT


Just start reading the SDK ... thought the solution would run - bug? or something wrong in my installation?

-- Not sure where to post problem? Moderator please move to the right spot
Fx
Freshman
Freshman
 
Posts: 2
Joined: Thu Nov 22, 2007 10:48 pm

Top

Postby plusminus » Fri Nov 23, 2007 1:07 am

Hello FX,

the error you receive means, that you are trying to base a ListView on a Layout that is not containing a attribute: 'android.R.id.list'.

:idea: You probably forgot to copy/import the "res/layout/main.xml" (or a similar *.xml-file from res/layout/) to your project directory.

Let us know if that was the solution :) .

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

working

Postby Fx » Fri Nov 23, 2007 8:53 pm

Sorry my mistake .. :oops: .. did not import properly .. it's working
Thks
Fx
Fx
Freshman
Freshman
 
Posts: 2
Joined: Thu Nov 22, 2007 10:48 pm

Postby Kevin Chen » Tue Dec 11, 2007 8:32 am

And I also met this problem.
Although the xml files are imported correctly, the run time error still exists.
:D Thanks for the clue from plusminus. I check all the xml files clearfully, and found the root cause.
I mistook the "id" to "ID" in the xml. When I correct it, it's working.
Kevin Chen
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Dec 11, 2007 4:50 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 13 guests