Hy.
My startactivity should be a ListActivity.
public class Main extends ListActivity
Layout:
<?xml version="1.0" encoding="utf-8"?>
<ListView android:id="@+id/listView1" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"></ListView>
Everytime i start the app it crashs.
Please help
Logs:
09-22 16:37:35.115: ERROR/AndroidRuntime(349): Uncaught handler: thread main exiting due to uncaught exception
09-22 16:37:35.129: ERROR/AndroidRuntime(349): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.korn.pizzacounter/com.korn.pizzacounter.Main}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
09-22 16:37:35.129: ERROR/AndroidRuntime(349): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
09-22 16:37:35.129: ERROR/AndroidRuntime(349): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
09-22 16:37:35.129: ERROR/AndroidRuntime(349): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
09-22 16:37:35.129: ERROR/AndroidRuntime(349): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
09-22 16:37:35.129: ERROR/AndroidRuntime(349): at android.os.Handler.dispatchMessage(Handler.java:99)
09-22 16:37:35.129: ERROR/AndroidRuntime(349): at android.os.Looper.loop(Looper.java:123)
09-22 16:37:35.129: ERROR/AndroidRuntime(349): at android.app.ActivityThread.main(ActivityThread.java:4363)
09-22 16:37:35.129: ERROR/AndroidRuntime(349): at Your content must have a ListView whose id attribute is 'android.R.id.list'
If it’s an ListActivity your default list must be called like this:
See developer documentation
http://developer.android.com/reference/android/app/ListActivity.html