> First thing I noticed was no call to setContentView().

But my activity extends from ListActivity and when I add
setContentView(), then Logcat gives following error
01-04 08:26:52.279: ERROR/AndroidRuntime(257):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.monarch.newhomeautomation/
com.monarch.newhomeautomation.ShowScheduler}:
java.lang.RuntimeException: Your content must have a ListView whose id
attribute is 'android.R.id.list'
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2496)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2512)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.app.ActivityThread.access$2200(ActivityThread.java:119)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.os.Handler.dispatchMessage(Handler.java:99)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.os.Looper.loop(Looper.java:123)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.app.ActivityThread.main(ActivityThread.java:4363)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
java.lang.reflect.Method.invokeNative(Native Method)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
java.lang.reflect.Method.invoke(Method.java:521)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
dalvik.system.NativeStart.main(Native Method)
01-04 08:26:52.279: ERROR/AndroidRuntime(257): Caused by:
java.lang.RuntimeException: Your content must have a ListView whose id
attribute is 'android.R.id.list'
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.app.ListActivity.onContentChanged(ListActivity.java:236)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:
201)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.app.Activity.setContentView(Activity.java:1622)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
com.monarch.newhomeautomation.ShowScheduler.onCreate(ShowScheduler.java:
19)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2459)
01-04 08:26:52.279: ERROR/AndroidRuntime(257):     ... 11 more

On Jan 3, 8:16 pm, TreKing <[email protected]> wrote:
> On Sun, Jan 2, 2011 at 11:32 PM, pramod.deore <[email protected]>wrote:
>
> > But I didn't find anything wrong in code . here ia my code which populate
> > the list
>
> First thing I noticed was no call to setContentView().
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to