官术网_书友最值得收藏!

Time for action – downloading Java, the Android SDK, and the ODK

The first component we'll need is the Java Development Kit (JDK) and Java Runtime Engine (JRE) to handle the Java-side of the OUYA console. Because these are common packages, you may already have them installed on your computer; to check this, open a command line (Command Prompt in Windows or Terminal in Mac) and type the command javac -version. If a version number is displayed, skip over step one of this section and move on to downloading the Android ADT bundle. If you receive an error message that reads "command not found", continue with these steps to install the JDK and JRE.

  1. Download and install the JDK and JRE, both of which are available on the Oracle website at http://www.oracle.com/technetwork/java/javase/downloads/index.html.

    The download links will be in the middle of the page, as shown in the following screenshot, with a Server JRE download button between them that you can ignore:

    Time for action – downloading Java, the Android SDK, and the ODK
  2. Once you've downloaded and run the installers, you'll need to download the Android SDK/ADT bundle, which can be found at http://developer.android.com/sdk/index.html.

    When installing, you'll want to put everything into a folder called Development in your root directory so that if you're using Windows, the full path of the bundle will appear as C:\Development\adt-bundle-windows-x86_64. If you're using Mac OS, put it in your home directory so that it appears as ~/Development/adt-bundle-mac-x86_64. This is important because later, you'll need to change your computer's PATH variable to point to that location.

  3. Create a new OUYA developer account by navigating to the developer portal at https://devs.ouya.tv/developers and clicking on Sign in to download the OUYA Development Kit. Click on Sign up on the following page and follow the instructions to create your OUYA developer account.

    The Sign up button is directly below the login area on the Sign in page, as shown in the following screenshot:

    Time for action – downloading Java, the Android SDK, and the ODK
  4. Finally, download the OUYA Development Kit from the front page of the developer portal. When you unpack it, put it in your Development folder so that its path is Development\OUYA-ODK.

What just happened?

The Java packages you installed first are necessary for building a game on OUYA, even though you won't be programming in Java; we'll demonstrate the application of the JDK in a later tutorial.

You'll be developing with the API included in the Android SDK/ADT bundle. The OUYA OS is based on Android, which means that there are similarities between it and other devices that run some version of Android. The OUYA Development Kit, on the other hand, is for everything OUYA-specific in development, such as controller input or in-app purchasing. The packages you've downloaded so far are in your Development folder, which we will now add to your computer's PATH variable so that the command line recognizes it.

主站蜘蛛池模板: 吐鲁番市| 蓬安县| 右玉县| 新宾| 晋江市| 广水市| 会东县| 礼泉县| 九龙县| 科技| 麻阳| 盐城市| 应城市| 新余市| 红安县| 阳朔县| 德昌县| 韶关市| 濉溪县| 通化县| 龙门县| 赣榆县| 延吉市| 嘉义市| 武胜县| 天长市| 屏边| 永兴县| 平谷区| 汉源县| 台湾省| 金川县| 巴楚县| 滁州市| 安宁市| 临清市| 瓮安县| 馆陶县| 紫金县| 城口县| 普格县|