JNI_OnLoad already implemented error

JNI_OnLoad already implemented error
0.0 0


I use CocosDenshion for my android project, and have a c++ module(.cpp +.h) which use JNI (call java methods from c++ native code), so it has a his own JNI_OnLoad procedure similiar to CocosDenshion do it’s job.
I compile CocosDenshion like a static lib ( C++ module static too), but at last part of compilation it gives me error what a JNI_OnLoad already implemented in CocosDenshion
How to avoided it? or fix? Or just write static class like a JniHelper in Cocos2dx, which every Jni depended class can use? (cos Android’s VM only allows one)


One .so can only have one JNI_OnLoad(), so you can compile CocosDenshion as a dynamic lib.
Just like HelloWorld.