Engine Runtime code doesn't get compiled when building the project

Hello,

I’ve been trying to use JNI (the way of calling UE4->Android methods) in UE4 these past few days but have been struggling to execute my code. I edited AndroidJNI.h and AndroidJNI.cpp to add my methods in the exact same manner in which the existing ones have been written and included the .h file in my custom actor class. However the thing just won’t work no matter what I do.

Finally I came to realization that the .cpp code doesn’t ever get recompiled when building for Android - I can put literally whatever there and I won’t see any errors. So my question is:

What should I do to include these files in the compilation process? Should I add some dependency in Build.cs files? Is there a magic bat file that will recompile them? Or would I have to recompile the entire engine from github?

Thanks in advance.

Problem solved - I had to compile the engine from the source as the binary version will not compile Engine files.