Hi guys, Here's what I got when I tried to use fragments:
12-04 17:03:11.390: ERROR/mono(5715): Unhandled Exception: Android.Views.InflateException: Exception of type 'Android.Views.InflateException' was thrown. 12-04 17:03:11.390: ERROR/mono(5715): at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x00000] in <filename unknown>:0 12-04 17:03:11.390: ERROR/mono(5715): at Android.App.Activity.SetContentView (Int32 layoutResID) [0x00000] in <filename unknown>:0 12-04 17:03:11.390: ERROR/mono(5715): at ManagementRapportage.Activities.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00000] in <filename unknown>:0 12-04 17:03:11.390: ERROR/mono(5715): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) [0x00000] in <filename unknown>:0 12-04 17:03:11.390: ERROR/mono(5715): at (wrapper dynamic-method) object:69756ccb-0e17-4fcf-bbce-420b9b7fea6a (intptr,intptr,intptr) 12-04 17:03:11.390: ERROR/mono(5715): --- End of managed exception stack trace --- 12-04 17:03:11.390: ERROR/mono(5715): android.view.InflateException: Binary XML file line #1: Error inflating class fragment 12-04 17:03:11.390: ERROR/mono(5715): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:688) 12-04 17:03:11.390: ERROR/mono(5715): at android.view.LayoutInflater.rInflate I double checked the XML I wrote and as far as I can see now it's correct. Here's the XML layout file I used: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <fragment android:name="managementrapportage.fragments.ProjectListFragment" android:layout_width="0dp" android:layout_weight="1" android:layout_height="match_parent" android:id="@+id/ProjectListFragment"/> <fragment android:name="managementrapportage.fragments.ProjectDetailsFragment" android:layout_width="0dp" android:layout_weight="2" android:layout_height="match_parent" android:id="@+id/ProjectDetailsFragment"/> </LinearLayout> This is using the latest beta on a galaxy tab 10.1 running Android 3.1 Kind regards, Willem Meints -----Oorspronkelijk bericht----- Van: [email protected] [mailto:[email protected]] Namens Tomasz Cielecki Verzonden: vrijdag 18 november 2011 15:39 Aan: Discussions related to Mono for Android Onderwerp: Re: [mono-android] inflate exception Also the inflation exception might be because of you not correctly referencing a custom view you made or something. I.e. mixing uppercase and lower case letters when Java spec only allows lower case letters for package names. Like described here: http://docs.xamarin.com/android/advanced_topics/using_custom_views_in_a_layout On Thu, Nov 17, 2011 at 10:59 PM, Tomasz Cielecki <[email protected]> wrote: > So you say you do not get any information or stack traces in your > output window in Visual Studio? > > If you run the latest beta there should be improvements on that part > catching uncaught exceptions and presenting them in VS - that is ofc. > if you actually use the debugger. > > Otherwise you can either use adb or ddms to show the device log and > see if there is any stack traces there. > > You can just paste the XML here on the mailing list so that others can > help as well, or put it in a gist or on pastebin. > > On Thu, Nov 17, 2011 at 4:47 PM, Wally McClure > <[email protected]> wrote: >> Tomas, >> >> I sometimes forget that you guys need info to. Last night, I wasn't >> getting any info regarding Android.View.InflateException, now I am >> getting an error that implies that my xml is incorrect. Basically, >> I'm asking if there is anyway to surface more information regarding >> errors in visual studio so that I don't have to go out to adb, ddms, or >> anything else. >> >> I can send you the project. Would that be helpful? >> >> Wally >> >>> Date: Thu, 17 Nov 2011 10:21:01 +0100 >>> From: [email protected] >>> To: [email protected] >>> Subject: Re: [mono-android] inflate exception >>> >>> Can you show us the code using to inflate? >>> >>> Also could you provide the whole error instead of "I'm getting >>> something like: InflateException". It is hard for us to reproduce >>> and help you if you don't provide more information. >>> >>> On Thu, Nov 17, 2011 at 3:33 AM, Wally McClure >>> <[email protected]> wrote: >>> > I'm writing a sample with honeycomb and am using fragments. I'm >>> > debugging this and am getting an exception when I load my layout. >>> > In the VS messagebox, I'm getting something like: >>> > InflateException: >>> > >>> > Unfortunately, the information that I think should come out isn't. >>> > As a result, I'm trying to hunt and peck to figure out what my problem is. >>> > Is >>> > there anyway to bubble up more information? >>> > >>> > Wally >>> > >>> > _______________________________________________ >>> > Monodroid mailing list >>> > [email protected] >>> > >>> > UNSUBSCRIBE INFORMATION: >>> > http://lists.ximian.com/mailman/listinfo/monodroid >>> > >>> > >>> >>> >>> >>> -- >>> Med Venlig Hilsen / With Best Regards Tomasz Cielecki >>> http://ostebaronen.dk >>> _______________________________________________ >>> Monodroid mailing list >>> [email protected] >>> >>> UNSUBSCRIBE INFORMATION: >>> http://lists.ximian.com/mailman/listinfo/monodroid >> >> _______________________________________________ >> Monodroid mailing list >> [email protected] >> >> UNSUBSCRIBE INFORMATION: >> http://lists.ximian.com/mailman/listinfo/monodroid >> >> > > > > -- > Med Venlig Hilsen / With Best Regards > Tomasz Cielecki > http://ostebaronen.dk > -- Med Venlig Hilsen / With Best Regards Tomasz Cielecki http://ostebaronen.dk _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
