Developer Console

Download Fire App Builder and Build an App

To get setup with Fire App Builder, start by downloading the project from GitHub. Make sure you have the Java Development Kit (JDK) and Android Studio installed. Then open the sample "Application" directory.

Step A: Download Fire App Builder

Due to differences in symbolic linking defaults in Git between Mac and Windows, instructions differ here by operating system.

Mac

If you're on a Mac or Linux, download the code for Fire App Builder using one of the following options.

  • Download the code as a zip file. Go to http://github.com/amzn/fire-app-builder and click Code > Download ZIP.

    OR

  • Clone the repository using the command prompt. In the command prompt, browse to the directory you want, and then run the git clone command to download the files:

    git clone http://github.com/amzn/fire-app-builder.git
    
s
Windows

If you're on Windows, before you clone the Fire App Builder repository, you have symbolic linking set as true in your git settings. Otherwise, you might run issues building the project.

  1. Check whether you have admin privileges on your computer (by going to Start > Control Panel > User Accounts > Manage User Accounts). If you don't have admin privileges, it's okay. You can run a later script to fix any issues.
  2. Configure git to allow symlinks. If you have administrative privileges, open your command prompt as an administrator and run the following:

    git config -–global core.symlinks true
    

    Running this command sets git config to enable symlinks. All Linux symlinks are converted to Windows symlinks during git clone.

  3. Download the code for Fire App Builder using one of the following options.
    • Download the code as a zip file. Go to http://github.com/amzn/fire-app-builder and click Code > Download ZIP.

      OR

    • Clone the repository using the command prompt. In the command prompt, browse to the directory you want, and then run the git clone command to download the files:

      git clone http://github.com/amzn/fire-app-builder.git
      
  4. If you didn't have administrative permissions to run git config –global core.symlinks true, run the scripts explained in Configure Symlinks for Windows Without Admin Privileges.

Step B. Set Up the JDK

You need the 1.8 version JDK or greater from Oracle. You'll use the JDK to compile Java apps on your machine. First, check to see if you already have the JDK:

  1. Open the command prompt.
  2. Type java -version. If you have the JDK, the response should be something like this:

    java version "1.8.0_121"
    Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode
    

    On Windows, you can also manually look in a directory such as C:\Program Files\Java\jdk1.8.0\ to see if the JDK is there.

  3. If you don't have the JDK, download the appropriate version of the JDK Installer for your machine from Java SE Development Kit Downloads and run it. For more details, see the following:

Step C: Install Android Studio and the Necessary Tools and SDKs

To work with Fire App Builder, you must install Android Studio, the official IDE for Android projects.

See Getting Started with Android Studio and Install Android Studio for information about setting up the Android Studio development environment on your machine.

Fire App Builder requires you to have certain SDK tools and APIs installed with Android Studio. Selecting these tools from the Standalone SDK Manager ahead of time isn't necessary. When you open the Fire App Builder project (as described in the next section, Open the Sample App), Android Studio will prompt you to install any build tools or APIs that you're missing.

Step D: Open the Sample App in Android Studio

Open the "Application" project from Fire App Builder in Android Studio and build the app:

  1. Start Android Studio.
  2. At the Welcome screen, click Open an existing Android Studio project.

    If you don't see this welcome screen with these specific options, you probably haven't configured Android Studio with the JDK or any Android SDKs.

  3. Browse to the directory where you downloaded the fire-app-builder GitHub project. Inside the Fire App Builder project folder, select the Application folder, and then click Open.

    Gradle starts building the project.

    Depending on the latest release of Gradle, you might be prompted to update Gradle. If prompted, click Don't remind me again for this project.

    If Android Studio is missing any needed libraries or files, you might see messages such as the following:

    Or you might see the following in the Gradle Console:

    Or this message:

    If you see these messages, click these links to install the missing tools. Keep opening the project and installing any missing tools as prompted until Android Studio no longer complains.

    If you run into build failures, you can try cleaning and rebuilding the project (Build > Clean Project or Build > Rebuild Project).

  4. Open the Gradle Console by clicking the Build button in Android Studio's footer so you can monitor the progress of the Gradle Build. The console lets you know if the build succeeds or if Android Studio requires other downloads. Wait until Gradle finishes building.

    When the build finishes, you should see a message in the Gradle Console that says Gradle build finished. When Gradle finishes building the project, Android Studio shows the following directories in the Android view:

    Android Studio directories

    When Android opens the project, by default the Android view is shown (circled in red in the previous screenshot). The "Application" folder is simply referred to as "app." The Android view flattens the project's files and displays the most commonly used files into a more usable arrangement. However, the actual structure of the files differs on your computer disk. (The "Project" view shows you the actual arrangement of all the folders and files.)

Troubleshooting Build Issues

If you try to build the project but get an error that says:

Error: Content is not allowed in prolog

This error is related to Windows. When you cloned the Github repo, git didn't have symbolic linking configured to true. As a result, the symlinks used for some of the XML files didn't copy down with the right content.

To fix the issue, you must configure git to use symbolic links:

git config –global core.symlinks true

Then reclone the repo and build the project again. You can verify that the symlinks are working by looking at the strings.xml file in Utils > src > main > res > values > strings.xml > strings.xml (en-rUS). If you see normal content, the symlinks are working. In contrast, if there's just a short reference and nothing else, symlinks aren't working.

If you don't have permissions to configure symlinks, see Configure Symlinks for Windows Without Admin Privileges.

Next Steps

Go to the next step, Connect to Fire TV Through ADB. In this next step, you'll connect to a Fire TV device and run the app on the device.


Last updated: Apr 07, 2025