cocos2d-x sdk接入库文件拷贝问题

前端之家收集整理的这篇文章主要介绍了cocos2d-x sdk接入库文件拷贝问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
1、 先将库文件拷贝到jin/hellocpp目录下
2、修改build_native.py文件

def copy_mmso(app_android_root):
resources_dir = os.path.join(app_android_root,"jni/hellocpp")
armeabi_dir = os.path.join(app_android_root,"libs/armeabi")

for item in os.listdir(resources_dir):
path = os.path.join(resources_dir,item)
# Android can not package the file that ends with ".gz"
if not item.startswith('.') and item.endswith('.so') and os.path.isfile(path):
shutil.copy(path,armeabi_dir)

if __name__ == '__main__':前加上 copy_mmso(app_android_root)

3、编译后lib/armeabi下对应产生mm的库文件则成功

原文链接:https://www.f2er.com/cocos2dx/340210.html

猜你在找的Cocos2d-x相关文章