« Writing Android Apps with HTML5 JavaScript | Main | Autodesk exchange Portathon event – update »



Feed You can follow this conversation by subscribing to the comment feed for this post.

Igor Ganapolsky

It is not apparent, from your code, what the Java method `invokeMemberFuncFromNative()` looks like. Where is its implementation?

Philippe Leefsma

The full project is attached to that post, just download the zip and take a look...

Teja K

I’m trying to invoke Java method from native code. I was able to run your attached project and saw desired output.
But when I run the project by keeping only “invokeMemberFuncFromNative” call, I’m getting following error. Can you please help to identify the issue?
java.lang.NoSuchMethodError: no non-static method

sampa bhande

It is very relevant information. it is very useful for those people who wants more knowledge about android.

jo jo

wow, this is amazing! Thanks for providing this clear demonstration of how to hook into java objects and methods from cpp.
I'm still confused by this, though I've seen it in a few examples now
jmethodID methodId = env->GetMethodID(cls, "", "(I)V");

is the constructor always associated with (I)V? Seems like magic.

Philippe Leefsma

Hi there, I wrote the article a while ago and since then I didn't used NDK much but yes, that syntax seems to be the way to import constructor. See there for more details: https://stackoverflow.com/questions/9286661/calling-a-constructor-fails-in-jni-android

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment

Your Information

(Name is required. Email address will not be displayed with the comment.)

February 2017

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28        

Autodesk Blogs


Cloud and Mobile RSS Feed

Related Posts Plugin for WordPress, Blogger...