Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Employee Directory and FieldService prebuilt apps not running

$
0
0

Hello,

I have started learning Xamarin for work. I have tried to check the EmployeeDirectory and FielService project, but cannot run the apps.

I'm using Visual Studio Ultimate 2012. I'm building the Android project and start debugging on the Android device Nexus 4.

For Employee Directry : After the login/password screen, the application crashes and raises an exception "An unhandled exception occured.

There is a InvalidCastException on line 178 in PeopleGroupsAdapter.cs

public Java.Lang.Object [] GetSections ()
{
    var intPtr = JNIEnv.NewArray (sections.ToArray ());
    var array = new JavaArray<Java.Lang.Object> (intPtr, JniHandleOwnership.TransferLocalRef);
 ->   return (Java.Lang.Object [])array;
}

"Cannot cast from source type to destination type."
Source  "Mono.Android"  string
StackTrace  "at (wrapper castclass) object.__castclass_with_cache (object,intptr,intptr) <IL 0x0002c, 0x00080>\nat…"

For FieldService :

Same config. After the logging/password screen the app crashes. This time there is no breakpoint on a raised exception. I just have the pop-up message "Unfortunately, Field Service has stopped." on my device and that's all.

The Visual Studio Output says :

01-15 17:46:01.967 E/AndroidRuntime(15936): FATAL EXCEPTION: main
01-15 17:46:01.967 E/AndroidRuntime(15936): Process: FieldService.Android, PID: 15936
01-15 17:46:01.967 E/AndroidRuntime(15936): java.lang.NullPointerException
01-15 17:46:01.967 E/AndroidRuntime(15936):     at android.widget.TextView.makeNewLayout(TextView.java:6113)
01-15 17:46:01.967 E/AndroidRuntime(15936):     at android.widget.TextView.onMeasure(TextView.java:6389)
01-15 17:46:01.967 E/AndroidRuntime(15936):     at android.view.View.measure(View.java:16497)
01-15 17:46:01.967 E/AndroidRuntime(15936):     at android.widget.Spinner.setUpChild(Spinner.java:632)
01-15 17:46:01.967 E/AndroidRuntime(15936):     at android.widget.Spinner.makeView(Spinner.java:595)
01-15 17:46:01.967 E/AndroidRuntime(15936):     at android.widget.Spinner.getBaseline(Spinner.java:431)
01-15
(...)

So I'm stuck here and pretty clueless about what to do. Thanks for your help.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>