You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for providing this auto binding way, to save writing JNI bridge effort (and I'm not familiar with c++).
But I hit this error when compiling:
ktbind.hpp:453:54: error: cannot initialize a parameter of type 'JNIEnv **' (aka '_JNIEnv **') with an rvalue of type 'void **'
I'm writing an Android app, NDK version 21.4.7075529, see if any more detail need to be provided?
The text was updated successfully, but these errors were encountered:
Android appears to have a different signature for the member function AttachCurrentThread; while standard JNI has type void** as the first function parameter, Android has JNIEnv**, thus the type mismatch. Simply removing the reinterpret_cast should make the compiler succeed:
if (_vm->AttachCurrentThread(&_env, nullptr) == JNI_OK) {
thanks for providing this auto binding way, to save writing JNI bridge effort (and I'm not familiar with c++).
But I hit this error when compiling:
ktbind.hpp:453:54: error: cannot initialize a parameter of type 'JNIEnv **' (aka '_JNIEnv **') with an rvalue of type 'void **'
I'm writing an Android app, NDK version 21.4.7075529, see if any more detail need to be provided?
The text was updated successfully, but these errors were encountered: