【转】使用create_project.py创建cocos2d项目时出错
命令格式:create_project.py -project 项目名字 -package 包名 -language cpp,例如:
create_project.py -project HelloCocoStudio -package com.john.test -language cpp
注意:包的写法要注意,应该是3层结构,比如 com.aaa.bbb,如果是2层,如果 com.aaa,则会报错,出错信息大概如:
E:\myBook\cocos2dx\cocos2d-x-2.2\cocos2d-x-2.2\tools\project-creator>create_proj
ect.py -project HelloCocoStudio -package com.john -language cpp
proj.ios : Done!
Traceback (most recent call last):
File "E:\myBook\cocos2dx\cocos2d-x-2.2\cocos2d-x-2.2\tools\project-creator\cre
ate_project.py", line 195, in
processPlatformProjects(platform)
File "E:\myBook\cocos2dx\cocos2d-x-2.2\cocos2d-x-2.2\tools\project-creator\cre
ate_project.py", line 139, in processPlatformProjects
proj_path + "src/" + dst_pkg[0] + "/" + dst_pkg[1] + "/" + dst_pkg[2])
IndexError: list index out of range
输了你,赢了世界又如何...