I am just starting to use Mono for Android Development environment. I use
MonoDevelop as the IDE. I run one very basic HelloAndroid example and it is
doing fine. Then I go ahead and run another bluetooth program in Chapter
8/BlueToothAdapter project.

The code is downloaded from the following link:

http://www.wrox.com/WileyCDA/WroxTitle/Professional-Android-Programming-with-Mono-for-Android-and-NET-C-.productCd-1118026438,descCd-DOWNLOAD.html

When I run it it goes all the way through "Deployment Completed" and then
throws the exception below, on the emulator if I double click the app name
"bluetooth" it just shows up for a couple seconds and then disappears and
returns to the menu.

UNHANDLED EXCEPTION: System.NullReferenceException: 
Object reference not set to an instance of an object 
at BlueTooth.Activity1.OnCreate (Android.OS.Bundle) <0x00114> 
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_
(intptr,intptr,intptr) <0x00057> 
at (wrapper dynamic-method) object.d8c72470-48ef-4e40-8fd4-26e1cca19c00
(intptr,intptr,intptr)<0x00033>

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an
object
at BlueTooth.Activity1.OnCreate (Android.OS.Bundle bundle) [0x00000] in
<filename unknown>:0 
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv,
IntPtr native__this, IntPtr native_savedInstanceState) [0x00000] in
<filename unknown>:0 
at (wrapper dynamic-method) object:d8c72470-48ef-4e40-8fd4-26e1cca19c00
(intptr,intptr,intptr)
I am sure I did not change anything in the sample code so I really don't
know what might possibly go wrong. Is there any project/linker configuration
step that I missed? Anything specific to this program needs to be configured
but not necessary for other simple program like HelloWorld? Any input can be
very helpful! Thanks!



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Bluetooth-Sample-program-throws-Unhandled-Exception-on-MonoDev-tp5712173.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to