在cocos2DX mutiplatform游戏环境定义NDK_ROOT [英] define NDK_ROOT in cocos2DX mutiplatform game enviroment

查看:341
本文介绍了在cocos2DX mutiplatform游戏环境定义NDK_ROOT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用Android的cocos2dx工作,我下面的http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started 。现在,我已经成功地通过以下链接运行我的第一个世界你好示范项目。我还设置环境paramters:

i have just started working with cocos2dx android and i am following wonderful tutorial of http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started . Now , i have successfully run my first hello world demo project by following this link. i also set environment paramters:

NDK_ROOT_LOCAL="/MY ANDROID NDK PATH/"

ANDROID_SDK_ROOT_LOCAL="/MY ANDROID SDK PATH/"

我也跟着教程完全按照它给出,还是我运行我的项目第二次,同时面临的问题,意味着我必须每一次出口DNK_ROOT从终端来运行我的项目和放大器;它真的累了,似乎不是在为我进一步落实..虽然我跑项目它说,请确定NDK_ROOT虽然我已经定义

i followed tutorial perfectly as given in it , still i am facing problem while running my project second time , means i have to export DNK_ROOT every time from terminal to run my project & it's really tired and seemed not working for my further implementation.. and while i run project it says please define NDK_ROOT though i already define

我也可手动在我的.bash的个人资料(create-android-project.sh)定义这些变量这样

i also manually define these variables in my .bash profile (create-android-project.sh) this way

NDK_ROOT_LOCAL = "/MY ANDROID NDK PATH/"

ANDROID_SDK_ROOT_LOCAL = "/MY ANDROID SDK PATH/"

谁能告诉我什么,我设立这个很想念???

Can anyone tell me what i am missing in setting up this ???

推荐答案

为使这些变量永久的(所以你打开以后已经然后每终端shell)使用自己喜欢的文本编辑器来更新您的bash配置文件(我选择vi来保持它在终端)

To make those variables permanent (so every terminal shell you open hereafter has then) use your favorite text editor to update your bash profile (I chose vi to keep it in the terminal)

请注意:在路径使用〜仅仅是用户目录的简写。你的情况,这似乎是代名词说的〜=/用户/亚历克斯

NOTE: the use of "~" in a path is just shorthand for your user directory. In your case it appears to be synonymous with saying "~" = "/Users/alex"

vi ~/.bash_profile

添加以下行并保存(更新这些名称和路径的匹配实际环境中,我假设一切都在你的用户目录的根在这里):

add the following lines and save (update these names and paths to match your actual environment, I am assuming everything is in the root of your user directory here):

export NDK_ROOT_LOCAL =~/android-ndk-r10b
export ANDROID_SDK_ROOT_LOCAL =~/sdk

使用在当前终端会话中运行配置文件或只需打开一个新的终端

Use source to run the profile in the current terminal session or just open a new terminal

source ~/.bash_profile

您可以测试,看看是否变量这里定义(使用任何你叫他们)

You can test to see if the variables are defined here (use whatever you named them)

echo $NDK_ROOT_LOCAL

echo $ANDROID_SDK_ROOT_LOCAL

这篇关于在cocos2DX mutiplatform游戏环境定义NDK_ROOT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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