摘要: //如果直接fopen是不跨平台的 //需要使用cocos每个平台封装好的方法 { FileUtils *utils = FileUtils::getInstance(); std::string outFileName = utils->fullPathForFilename(zipFile); 阅读全文
posted @ 2020-04-03 23:07 YZFHKMS-X 阅读(146) 评论(0) 推荐(0)
摘要: { 工具类代码 public native static String getAssetStringUseJNI(Context context,String path); 1NDK代码#include <jni.h>#include <assert.h>#include <string.h>#in 阅读全文
posted @ 2020-04-03 22:51 YZFHKMS-X 阅读(202) 评论(0) 推荐(0)
摘要: { Android资源系统(resources system)可以用来打包应用所需的图片、XML文件以及其他非Java资源,这里来学习下另一种资源打包方式:assets。 resources资源可以存储声音文件,比如在res/raw目录可以保存xxx.wav文件,然后使用R.raw.xxx来获取它。 阅读全文
posted @ 2020-04-03 00:06 YZFHKMS-X 阅读(394) 评论(0) 推荐(0)