Application Crashes when using AndroidJavaProxy
I'm trying to write an Android Plugin and I've just gotten to the point where I have to implement a Java interface so I can give a native class a listener. But when I try to instantiate one, Unity crashes.
The listener looks like this:
public partial class API // it's part of a bigger system.
{
private class Listener : AndroidJavaProxy
{
public Listener() : base("java string to interface") {}
// implementation of interface
}
}
The Error block is here: https://pastebin.com/eCRrrfxD
Digging into the JNI, it looks like it's failing on: AndroidJNI.NewGlobalRef(jobject) Where jobject comes from this: AndroidJNISafe.FindClass("java/lang/System") I hope I'm wrong and it's something I can fix but, currently, all evidence points towards the interface string being wrong and not there. Can anyone confirm or give me a better idea?
Comment
Your answer
