I am getting this error JNI ERROR (app bug): accessed stale global reference When I run my app in Android OS v4, But when I run the same application in Andr
This applies to kotlin:
To add to what @krys has already mentioned, make sure that signatures on Kotlin side match exactly what you have in the JNI code. Even a simple Void (avoid explicit Void at the end of function signatures that return void on the JNI side) signature at the end of kotlin reference may fail and would make your debugging extremely frustrating.