This exception doesn't occur until the problem layout is actually loaded, meaning if it occurs before the first screen comes up it's the layout for the first screen.
And the exception is raised when setContentView is done with the problem layout ID. If you step through your code you'll likely see it blow up when setContentView is being done for your first screen. On Oct 9, 5:01 pm, Pankaj <[email protected]> wrote: > Ya I got that much from the exception, But in which XML ? I could not > figure that out that is why I have provided the xml files > > On Oct 9, 4:00 am, DanH <[email protected]> wrote: > > > Speak of the devil! (Just had this problem myself.) Read carefully > > the first few lines in yourexceptionstack: > > > Binary XML file line #25: You must supply a layout_height attribute. > > > On Oct 8, 4:42 pm, Pankaj <[email protected]> wrote: > > > > Hi all, > > > > I get anexceptioneverytimeIlaunchtheapplication. Here is the > > > stacktrace for theexception > > > > 10-01 14:49:35.321: WARN/WindowManager(61):Exceptionwhen adding > > > starting window > > > 10-01 14:49:35.321: WARN/WindowManager(61): > > > java.lang.RuntimeException: Binary XML file line #25: You must supply > > > a layout_height attribute. > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.content.res.TypedArray.getLayoutDimension(TypedArray.java:438) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java: > > > 3468) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:3547) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.widget.LinearLayout$LayoutParams.<init>(LinearLayout.java: > > > 1265) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.widget.LinearLayout.generateLayoutParams(LinearLayout.java: > > > 1191) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:45) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.view.LayoutInflater.rInflate(LayoutInflater.java:620) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.view.LayoutInflater.inflate(LayoutInflater.java:407) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.view.LayoutInflater.inflate(LayoutInflater.java:320) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.view.LayoutInflater.inflate(LayoutInflater.java:276) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java: > > > 2153) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java: > > > 2207) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java: > > > 1395) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > com.android.internal.policy.impl.PhoneWindowManager.addStartingWindow(PhoneWindowManager.java: > > > 818) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > com.android.server.WindowManagerService > > > $H.handleMessage(WindowManagerService.java:8794) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.os.Handler.dispatchMessage(Handler.java:99) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > android.os.Looper.loop(Looper.java:123) > > > 10-01 14:49:35.321: WARN/WindowManager(61): at > > > com.android.server.WindowManagerService > > > $WMThread.run(WindowManagerService.java:531) > > > > I am also posting the XML files I'm using. > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/ > > > android" > > > android:id="@+id/arw_layout" android:orientation="horizontal" > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content"> > > > <ImageView android:id="@+id/arw_logo" android:layout_width="30px" > > > android:layout_height="40px" > > > android:layout_alignParentRight="true" /> > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > > android" > > > android:orientation="horizontal" > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content" android:gravity="center" > > > android:layout_alignParentLeft="true"> > > > <TextView android:id="@+id/arw_left" > > > android:layout_width="wrap_content" > > > android:layout_height="wrap_content" android:text="@string/ > > > arw_left" > > > android:textSize="25sp" android:paddingLeft="10dp" > > > android:paddingRight="10dp" > > > android:gravity="center_vertical" /> > > > <TextView android:id="@+id/arw_title" > > > android:layout_width="wrap_content" > > > android:layout_height="wrap_content" android:minEms="10" > > > android:text="@string/arw_title" > > > android:paddingLeft="10dp" > > > android:paddingRight="10dp" android:gravity="center" /> > > > <TextView android:id="@+id/arw_right" > > > android:layout_width="wrap_content" > > > android:layout_height="wrap_content" android:text="@string/ > > > arw_right" > > > android:textSize="25sp" android:paddingLeft="10dp" > > > android:paddingRight="10dp" > > > android:gravity="center_vertical" /> > > > </LinearLayout> > > > </RelativeLayout> > > > > <?xml version="1.0" encoding="utf-8"?> > > > <shape xmlns:android="http://schemas.android.com/apk/res/android" > > > android:shape="rectangle"> > > > <gradient > > > android:startColor="#FF493538" > > > android:centerColor="#FF000000" > > > android:endColor="#FF000000" > > > android:angle="270" /> > > > </shape> > > > > <?xml version="1.0" encoding="utf-8"?> > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > > > android" > > > android:orientation="vertical" > > > android:layout_width="fill_parent" > > > android:layout_height="fill_parent" > > > > > > > <TextView > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content" > > > android:text="@string/hello" > > > /> > > > </LinearLayout> > > > > <?xml version="1.0" encoding="utf-8"?> > > > <resources> > > > <declare-styleable name="Gallery1"> > > > <attr name="android:galleryItemBackground" /> > > > </declare-styleable> > > > </resources> > > > > <?xml version="1.0" encoding="utf-8"?> > > > <resources> > > > <style name="WindowTitleBackground" > > > parent="android:WindowTitleBackground"> > > > <item name="android:background">@drawable/gradient</item> > > > </style> > > > </resources> > > > > <?xml version="1.0" encoding="UTF-8"?> > > > <resources> > > > <style name="titletheme"> > > > <item name="android:windowTitleBackgroundStyle">@style/ > > > WindowTitleBackground > > > </item> > > > </style> > > > </resources> > > > > can anyone tell me which XML produces thisexception. > > > > I get it only when Ilaunchthe app. After that while browsing through > > > different activities no suchexceptionoccurs -- 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

