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
- Step B. Set Up the JDK
- Step C: Install Android Studio and the Necessary Tools and SDKs
- Step D: Open the Sample App in Android Studio
- Troubleshooting Build Issues
- Next Steps
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.
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
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.
- 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.
-
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.
- 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
-
- 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:
- Open the command prompt.
-
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. -
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:
- Mac: 10 JDK 8 Installation for OS X
- Windows: JDK Installation for Microsoft Windows. (Specifically, see "Running the JDK Installer" and "Updating the PATH Environment Variable.")
- For other operating systems and information, see JDK 8 and JRE 8 Installation Start Here.
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:
- Start Android Studio.
-
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.
-
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.
Note: The first time you open the project, it can take anywhere from 20–40 minutes for Gradle to build the project. The build time depends on the assets Gradle must download as well as your network and processor speed. Subsequent times should take about a minute or less. As you're waiting, consider taking an app tour to become familiar with the app. Also consider exploring the Settings options on your Fire TV device.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).
-
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: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.)
Note: Unless otherwise specified, this documentation refers to locations of files using the Android view. Also, this documentation was last reviewed using Android Studio 3.1.2. Android Studio is continually evolving, so some drift might occur with Android Studio references.
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