[英]Set Up Cocos2d-X For Android On Mac
I'm new to cocos2d-X.I'm trying to set up cocos2d-x for android and I exactly followed below video tutorial 我是cocos2d-X的新手,我正在尝试为Android设置cocos2d-x,我完全按照下面的视频教程进行操作
I failed the steps in terminal with problem (python setup.py command result is not as expected). 我在终端中的步骤失败并出现问题(python setup.py命令结果与预期不符)。
For example when I begin to setup in terminal I get the following error. 例如,当我开始在终端中设置时,出现以下错误。
->Please enter the path of NDK_ROOT (or press Enter to skip):/Users/apple/Documents/Development/Cosos2d-x/android-ndk-r9d
->Error: "/Users/apple/Documents/Development/Cosos2d-x/android-ndk-r9d " is not a valid path of NDK_ROOT. Ignoring it.
->Check environment variable ANDROID_SDK_ROOT
->Search for environment variable ANDROID_SDK_ROOT...
->ANDROID_SDK_ROOT not found
->Search for command android in system...
->Command android not found
The same above error happening for setup path ANDROID_SDK_ROOT and ANT_ROOT. 安装路径ANDROID_SDK_ROOT和ANT_ROOT发生以上相同的错误。
How can I fix the problem? 我该如何解决该问题? Thanks for get me out.
谢谢你让我出去。
I'm working on 我正在尝试
Do you copy the path to the terminal? 您是否将路径复制到终端?
If so, try to delete the trailing whitespace, it will solve the problem. 如果是这样,请尝试删除结尾的空格,这将解决问题。
Cocos script uses os.path.join($your_path, $some_extra_file)
, so you have to add slash /
at the end: Cocos脚本使用
os.path.join($your_path, $some_extra_file)
,因此您必须在末尾添加斜杠/
:
/Users/apple/Documents/Development/Cosos2d-x/android-ndk-r9d/
/用户/苹果/文档/开发/ Cosos2d-X / Android的NDK-r9d /
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.