Dennis Christy wrote:
> I'm using Eclipse, and here is what the logcat file has (a lot)
Colors will help you deal with this. Red = error. There is also an E in
a circle toolbar button that filters the output to only be the errors.
Java stack traces look like this:
> 06-21 20:33:23.096: ERROR/AndroidRuntime(737): Uncaught handler: thread
> main exiting due to uncaught exception
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737):
> java.lang.RuntimeException: Unable to start activity
> ComponentInfo{com.example.lunchlist/com.example.lunchlist.LunchList}:
> java.lang.RuntimeException: Binary XML file line #78: You must supply a
> layout_width attribute.
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3278)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.app.ActivityThread.access$1900(ActivityThread.java:112)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.os.Looper.loop(Looper.java:123)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.app.ActivityThread.main(ActivityThread.java:3948)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> java.lang.reflect.Method.invoke(Method.java:521)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> dalvik.system.NativeStart.main(Native Method)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): Caused by:
> java.lang.RuntimeException: Binary XML file line #78: You must supply a
> layout_width attribute.
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.content.res.TypedArray.getLayoutDimension(TypedArray.java:438)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:3319)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:3399)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.widget.LinearLayout$LayoutParams.<init>(LinearLayout.java:1265)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:1191)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:45)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:619)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:309)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.app.Activity.setContentView(Activity.java:1626)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> com.example.lunchlist.LunchList.onCreate(LunchList.java:41)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): ... 12 more
The key line is usually the one that looks like this:
> 06-21 20:33:23.136: ERROR/AndroidRuntime(737): Caused by:
> java.lang.RuntimeException: Binary XML file line #78: You must supply a
> layout_width attribute.
Here, this means your layout has a flaw -- you are missing an
android:layout_width attribute in line #78.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Need Android talent? Ask on HADO! http://wiki.andmob.org/hado
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---