无法处理,而包装的cocos2d-X的Andr​​oid资产 [英] unable to process assets while packaging cocos2d-x android

查看:190
本文介绍了无法处理,而包装的cocos2d-X的Andr​​oid资产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始工作的cocos2d-X来构建游戏。我已经完成了安装。我收到以下错误,当我运行HelloCpp样本。

I just started working on cocos2d-x to build games. I have completed setup. I am getting below error when I run "HelloCpp" sample.

(skipping file '.gitignore' due to ANDROID_AAPT_IGNORE pattern '.*')
Unable to add 'C:\cocos2d-x-2.2.1\samples\Cpp\HelloCpp\proj.android\assets\fonts\Marker Felt.ttf': Zip add failed
ERROR: unable to process assets while packaging 'C:\cocos2d-x-2.2.1\samples\Cpp\HelloCpp\proj.android\bin\resources.ap_'
ERROR: packaging of 'C:\cocos2d-x-2.2.1\samples\Cpp\HelloCpp\proj.android\bin\resources.ap_' failed

请帮我解决这个问题。

Kindly help me to fix this issue.

感谢。

推荐答案

这个问题有多种解决方案,我想他们中的每一个,而最后一个正常工作。我给你确切的步骤,我把得到它为我工作。

This problem has multiple solutions and I tried each one of them, and the last one worked properly. I am giving you the exact steps I took to get it work for me.

1,检查Cygwin的有留点套餐,如果不安装它们。下面的包是必需的 -

1.Check if Cygwin has the neccessary packages, if not install them. The following packages are required -

autoconf, automake, binutils, gcc-core, gcc-g++, gcc4-core, gcc4-g++, gdb, pcre, pcre-devel, gawk, make

(我跳过GCC4核和GCC4-G ++)

(I skipped gcc4-core and gcc4-g++)

2.Tried重命名标记Felt.ttf删除空间,但因为它得到再生,我搜索了所有我的C文件:驱动器,并重新命名它无处不在

2.Tried renaming Marker Felt.ttf to remove the space, however since it gets regenerated, I searched for the file in all of my C: drive and renamed it everywhere.

3.Then我在管理员模式下运行的Eclipse。

3.Then I ran Eclipse in Administrator mode.

4。我在这个时候得到同样的错误,虽然只有一次。所以我改变了资产的文件夹的权限在build_native.sh本身。而就在您build_native.sh文件的末尾添加以下行。(从两者这里

4.I was getting the same error although only once this time. So I changed the permission of the Asset folder in the build_native.sh itself. Just add the following line at the end of your build_native.sh file.(Taken from here)

chmod 777 -R "$APP_ANDROID_ROOT"/assets

和瞧,它的工作。我不知道其中的步骤之一是不需要,所以我把这里的一切。我猜,这不是必需的管理模式运行Eclipse,因为我可以在正常模式下现在的工作了。万一你陷入同样的​​问题,你可以尝试在管理模式下运行它。

and voila, it worked. I am not sure which one of the step was not required so I put everything here. I am guessing that running eclipse in admin mode was not required, since I can work now in normal mode too. Just in case you get into same problem you can try running it in admin mode.

这篇关于无法处理,而包装的cocos2d-X的Andr​​oid资产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆