OUYA Game Development by Example
上QQ阅读APP看书,第一时间看更新

Time for action – editing PATH on Windows

Perform the following steps to edit the PATH variable on Windows:

  1. To edit the PATH variable on Windows, right-click on Computer and select Properties. In the left panel of the Properties window, select Advanced system settings and click on Environment Variables….
    Time for action – editing PATH on Windows
  2. In the new window, in the topmost table labeled User variables, look for a variable called Path or PATH. If it exists, click on Edit… and add the following code to the end. If it doesn't exist, click on New… and create a variable called Path with the following code in it, but omit the preliminary semicolon:
    C:/Development/adt-bundle-windows-x86-64/sdk/tools;
    C:/Development/adt-bundle-windows-x86_64/sdk/platform-tools
  3. Accept the changes and exit the Environment Variables window. To prepare for the next step, open the Android SDK manager by navigating to C:\Development\adt-bundle-windows-x86_64 and running SDK Manager.exe.

What just happened?

The PATH variable on your computer tells your command line where to look for executable commands. Now that you've added the path to the Android SDK to your PATH variable, you can send Android commands to OUYA through the Mac OS Terminal or the Windows Command Prompt.

After adding the proper paths to your PATH variable, you opened the Android SDK manager. Now you'll use this tool to download all of the SDK packages your projects will need.

Installing packages with the Android SDK

Now that you've opened the Android SDK Manager, you'll need to tell it which packages to download so that you have everything the OUYA needs to be recognized by your system. These packages include the main tools of the SDK, the API files for the latest version of Android supported by the OUYA, and the USB driver that your computer needs in order to recognize the OUYA as an Android device.