============================================================ 博文原创,转载请声明出处 电子咖啡-专注于移动互联网
============================================================
在ios上运行没啥问题,在AndroID出问题不少。
1、编译遇到下面问题
**** Build of configuration Release for project test3 ****python /Users/yangeric/mCocos/test3/proj.androID/build_native.py -b release all AndroID NDK: WARNING: Ignoring unkNown import directory: jni/../../cocos2d AndroID NDK: WARNING: Ignoring unkNown import directory: jni/../../cocos2d/external jni/AndroID.mk:25: *** AndroID NDK: Aborting. . Stop.AndroID NDK: WARNING: Ignoring unkNown import directory: jni/../../cocos2d/cocos AndroID NDK: jni/AndroID.mk: Cannot find module with tag './prebuilt-mk' in import path Traceback (most recent call last): file "/Users/yangeric/mCocos/test3/proj.androID/build_native.py",line 159,in <module> build(opts.ndk_build_param,opts.androID_platform,opts.build_mode) file "/Users/yangeric/mCocos/test3/proj.androID/build_native.py",line 146,in build do_build(cocos_root,ndk_root,app_androID_root,ndk_build_param,sdk_root,androID_platform,build_mode)AndroID NDK: Are you sure your NDK_MODulE_PATH variable is properly defined ? AndroID NDK: The following directorIEs were searched: AndroID NDK: file "/Users/yangeric/mCocos/test3/proj.androID/build_native.py",line 82,in do_buildmake: Entering directory `/Users/yangeric/mCocos/test3/proj.androID'make: Leaving directory `/Users/yangeric/mCocos/test3/proj.androID'The Selected NDK toolchain version was 4.8 ! raise Exception("Build dynamic library for project [ " + app_androID_root + " ] fails!")Exception: Build dynamic library for project [ /Users/yangeric/mCocos/test3/proj.androID ] fails!**** Build Finished ****
修改:
test3/proj.androID/jni/AndroID.mk
编辑.mk文件,这一段
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d)$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/external)$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos)替换为
$(call import-add-path,/Applications/Cocos/frameworks/cocos2d-x/)$(call import-add-path,/Applications/Cocos/frameworks/cocos2d-x/external)$(call import-add-path,/Applications/Cocos/frameworks/cocos2d-x/cocos)
2、ok,接上面,继续运行,app 会crash,
logcat为
11-03 13:27:31.565: A/libc(21894): Fatal signal 11 (SIGSEGV) at 0x00000178 (code=1),thread 21910 (Thread-3932)
修改
test3/proj.androID/build_native.py
查找下面一行
resources_dir = os.path.join(app_androID_root,"../Resources")
改为
resources_dir = os.path.join(app_androID_root,"../res")ok,运行ok了 总结
以上是内存溢出为你收集整理的cocos 1.0 preview 遇到的问题全部内容,希望文章能够帮你解决cocos 1.0 preview 遇到的问题所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)