Anyone programming using Necessitas (Qt for Android)? -


i working necessitas (qt android). run fine.

now, trying connect dalvik jvm use of android api (gps example). i'm trying java environment using jni:

jnienv *currenv; currenv = 0; if (m_javavm->getenv((void**)&currenv,jni_version_1_4) == jni_ok) {     qdebug() << "getenv passed"; } else {     qdebug() << "getenv failed"; } 

m_javavm pointer virtual machine used necessitas.

the problem getenv failed when run application in android virtual device.

any appreciated!

i answering ow question:

this happens because getenv gets current env. while need to new env like:

if (currvm->attachcurrentthread((void **)&currenv, null)<0)         {             emit error("cannot attach current thread vm");         } 

Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -