Android NDK C++ JNI (no implementation found for native…)

There are a couple of things that can lead to “no implementation found”. One is getting the function prototype name wrong, another is failing to load the .so at all. Are you sure that System.loadLibrary() is being called before the method is used?

If you don’t have a JNI_OnLoad function defined, you may want to create one and have it spit out a log message just to verify that the lib is getting pulled in successfully.

You already dodged the most common problem — forgetting to use extern "C" — so it’s either the above or some slight misspelling. What does the Java declaration look like?

Leave a Comment