Reputation: 2097
Im getting the mentioned error while declaring static native method:
From the native side the link is working as expected:
Everything works as expected the problem is just the link(Android Studio 3.1.1) from java to the native reference which is broken for static(works for non-static ones) methods.
Upvotes: 1
Views: 1987
Reputation: 4442
I am not expert but I changed the second parameter from jobject
to jclass
and it worked for me.
Upvotes: 0
Reputation: 124
Try to change the type of the second argument in JNI method from jclass
to jobject
. Worked for me
Upvotes: 1
Reputation: 57203
There exists a funny workaround:
Upvotes: 3