Using JNI interface in Android, missing jni.h

In my effort to use a aar Android library from Unreal game, I stumbled into odd problem.

When I try to include JNI class into my own JNI wrapper class

    ... 
    #if USE_ANDROID_JNI
    #include <jni.h>
    ... 

the editor/android launch compiler simply tells that “Can not open include file 'jni.h: No such file or directory”.

So… I am doing something wrong here. Is there some inc path parameter somewhere in UE settings or what?

This is my 1st Unreal project :slight_smile:

Answering my own question: Pressing “compile” in editor does not seem to make a Target Android compile, but a Windows compile, and there is no jni.h available for Windows compile, thus fail. At least I think so.

Launch to Android device succeeds.Even Play in editor works. Only Compile fails.

Add #if PLATFORM_ANDROID around that include.