I want to call a method in my main Java class from HelloWorldScene.cpp. I have read this article: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How\_to\_use\_jniand can successfully invoke native code from java side. But when I am trying the other way round its not working.
What I did is, created simpleJni.cpp and simpleJni.h in my CLasses folder and did exact same thing as in SimpleAudioEngineJni.cpp but its crashing. Also JNI_onLoad function is giving error as it is already defined in main.cpp, Hope some one will help me with this.. Thank You.