--
Jayesh
On Mon, Oct 12, 2009 at 1:10 AM, Mark Murphy <[email protected]>wrote:
>
> Jayesh Salvi wrote:
> > Hi,
> >
> > In past couple of days, users of my app have sent crash reports
> > indicating errors in layout inflation.
> >
> > "android.view.InflateException: Binary XML file line #27: Error
> > inflating class java.lang.reflect.Constructor"
> >
> > After some investigation I found out that all four of them were using
> > the new Sprint HTC Hero devices. This error hasn't been reported on any
> > other device/ROM nor could I repro it in the emulator.
> >
> > From searching around, I figured this is the kind of error that one gets
> > if layout is too big or too wide. Although my layout is very well within
> > the limits that Android framework puts, I split it further and asked the
> > users to test. However, even with this fix the users are seeing similar
> > crash while inflating the layout.
> >
> > Has anyone else had same experience with the new Hero devices?
> >
> > Any suggestions on how I can proceed to fix/workaround the issue - given
> > that I don't have access to any such device?
> >
> > Following is the detailed stack trace of the crash:
> >
> > android.view.InflateException: Binary XML file line #27: Error inflating
> > class java.lang.reflect.Constructor
> >
> > android.view.LayoutInflater.createView(LayoutInflater.java:512)
> >
> >
> com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
> >
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:407)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> > android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> >
> > ....
> >
> > <-- application specific stack frames -->
>
> Ummm...what's at line #27 of the layout?
>
>
If it helps, I am attaching the xml layout file. Line 27 is:
27. <EditText
28. android:id="@+id/delcsTitle"
29. android:layout_width="fill_parent"
.. android:layout_height="wrap_content"
android:gravity="top|left"
android:lines="1"
/>
> --
> 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 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
-~----------~----~----~----~------~----~------~--~---
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/delcsview"
android:orientation="vertical"
android:paddingLeft="52dip"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<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:textStyle="bold"
android:textSize="16dip"
android:text="Title"
/>
<EditText
android:id="@+id/delcsTitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="top|left"
android:lines="1"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="16dip"
android:text="Notes"
/>
<EditText
android:id="@+id/delcsNotes"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="top|left"
android:lines="3"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="16dip"
android:text="Tags"
/>
<EditText
android:id="@+id/delcsTags"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="top|left"
android:lines="2"
/>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/delcsCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:textStyle="bold"
android:textSize="16dip"
android:text="Cancel"
/>
<Button
android:id="@+id/delcsPost"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:textStyle="bold"
android:textSize="16dip"
android:text="Post"
/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>