문제

I want to read some json files in android ndk ! problem is i could not find any tutorials that describe direct access to assets in ndk (most of them say i should pass pointer from java code to native but i cant use that ) I also tried to find some example about <android/asset_manager.h> but again no luck!

도움이 되었습니까?

해결책

Copy FileOperation.h and FileOperation.cpp into cocos2d-x/HelloWorld. Invoke FileOperation::saveFile() and FileOperation::readFile() in HelloWorld::init(). Modify cocos2d-x/HelloWorld/android/jni/helloworld/Android.mk.

Rebuild and run

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top