- OUYA Game Development by Example
- Jack Donovan
- 371字
- 2021-08-13 17:52:15
Time for action – editing PATH on Mac OS
If you're using Mac OS, your PATH variable can read paths from your .bash_profile
script. If you aren't familiar with it, you may not have one yet; so in that case, you'll need to create it by performing the following steps:
- Start up the Terminal and enter
cd ~/
to navigate to yourhome
folder. - Type
touch .bash_profile
to create it. - Enter
open -e .bash_profile
to open it for editing.
Once you have your bash profile open, add the following lines to it:
export ANDROID_HOME="~/Development/adt-bundle-mac-x86_64" export PATH=$PATH:$ANDROID_HOME/sdk/tools export PATH=$PATH:$ANDROID_HOME/sdk/platform-tools
Now that you've edited your PATH variable, you'll want to refresh it by typing the following command:
source ~/.bash_profile
To ensure the new directories were added to the PATH variable correctly, write the following line to display the PATH variable:
echo $PATH
After verifying that your PATH variable contains the directories that we added in this section, prepare for the next step by starting the Android SDK manager with the following command, and then close the Terminal:
android sdk
What just happened?
You've just edited your PATH variable permanently by adding a few directories to PATH in your profile file, which is loaded every time the computer starts up, so you'll never need to edit it again. Your profile is typically a hidden file starting with a period, and its specific name depends on whatever shell you're running (usually bash
, by default).
Adding the Android package directories to your PATH variable enables you to send commands to the OUYA console using the Mac OS Terminal, which will be a useful tool when you get into development.
The next tutorial outlines how to make this change on a Windows computer. Feel free to skip over it and advance to the section titled Installing packages with the Android SDK if you don't have a Windows computer or don't wish to develop on it at this point in time.
- 24小時學會電腦組裝與維護
- 龍芯應用開發標準教程
- Android NDK Game Development Cookbook
- Creating Dynamic UI with Android Fragments
- Learning Stencyl 3.x Game Development Beginner's Guide
- Learning Game Physics with Bullet Physics and OpenGL
- 微服務分布式架構基礎與實戰:基于Spring Boot + Spring Cloud
- 基于Apache Kylin構建大數據分析平臺
- 計算機組裝與維護(第3版)
- Rapid BeagleBoard Prototyping with MATLAB and Simulink
- 筆記本電腦應用技巧
- 固態存儲:原理、架構與數據安全
- 筆記本電腦維修實踐教程
- 基于PROTEUS的電路設計、仿真與制板
- LPC1100系列處理器原理及應用