Bu I got a compiler error 😦
Failed to create JavaTypeInfo for class: SpaceTime.Droid.WebView due to System.NullReferenceException: Object reference not set to an instance of an object.
I guess anybody familiar with Xamarin has already seen what my mistake was, but I’m still not that familiar, so I had to learn that…
- The ExportAttribute is used to instruct the “Java code generator to export a Java method that becomes an Android Callable Wrapper (ACW)” and
- System.Object is not a Java object (duh) and the Java code generator has no idea how to handle it.
So the simple fix to my problem was to switch the parameter type from System.Object to Java.Lang.Object. Now the Java code generator can properly generate an ACW and the compilation succeeds.
This is a silly mistake on my side, granted. But a slightly more expressive error message would have been very helpful.