how to access assets directly in android NDK - cocos2d-x
-
25-10-2019 - |
문제
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
제휴하지 않습니다 StackOverflow