Development Environment Setup

This is a guide designed to assist new FTC programmers setup the Android Studio environment to program a robot.

Ingredients

A Computer that has the required specs for Android Studio and installing Java.
Access to Admin Permissions on aforementioned computer.

Software to be Installed

FTC SDK: FtcRobotController
IDE: Android Studio
Java: Any recent version of Java
ADB: Android Debug Bridge

Recipe (Installation)

  1. Download and Install Java:
    NOTE: Installing Java may require Admin Permissions.
    • Download the latest version of Java.
    • Run the installer and follow the on-screen instructions.

  2. Download and Install Android Studio:
    NOTE: Installing Android Studio may require Admin Permissions.
  3. Download and Open FtcRobotController:
    • In the FtcRobotController GitHub repository, press the blue code button and press download zip.
    • Extract the contents of the zip file to a folder (typically in your Downloads or Documents folder).
    • In Android Studio, press File → Open (⌘ + O on Mac or Win + O on Windows).
    • Select the folder you extracted the zip file to, and press open. DO NOT open any folder inside the extracted folder.
      • On MacOS, you can alternatively drag the folder from Finder onto the Android Studio icon in your taskbar to open the folder.
    • Wait for the project to load. You should end up with 3 folders in the Android view panel (which you should automatically be moved to once ready): FtcRobotController, TeamCode, and Gradle Scripts.

  4. Install ADB:
    NOTE: Installing ADB may require Admin Permissions.
    • Download the latest version of ADB. Press on one of the three links depending on your operating system.
    • Extract the contents of the zip file to a folder (typically in your Downloads or Documents folder).
    • Add the folder to your system's PATH variable:
      • Windows:
        • Open the start menu and search for "Environment Variables", and press enter.
        • Click on "Edit the system environment variables".
        • Click on "Environment Variables".
        • In the "System variables" section, find the "Path" variable and click "Edit".
        • Click "New" and paste the path to the folder where you extracted the zip file.
        • Click "OK" on all the windows.
      • Mac:
        • Option 1 - Using Homebrew (Highly Recommended)
          Homebrew is a package manager for Mac. This is the easiest way and will provide automatic updates.

          • Install the Homebrew package manager by running the following command in a terminal:
          /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
          
          • Then, run this command to install ADB using Homebrew:
          brew install android-platform-tools
          
        • Option 2 - Manual Installation

          • Go to your Downloads folder with this command in terminal:
          cd ~/Downloads/
          
          • Then, to avoid deleting the ADB files, move the downloaded file to a new folder (the commands below should still work with modern versions of MacOS):
          mkdir ~/.android-sdk-macosx
          mv platform-tools/ ~/.android-sdk-macosx/platform-tools
          
          • Add platform-tools to your path
          echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile
          
          • Reload your terminal profile (or restart your terminal):
          source ~/.bash_profile
          
      • Linux:
        ADB should already be installed by default with the installation of Android Studio. If not, you can use the following steps below to install ADB manually:

        • Open a terminal window and run the following command:
          nano ~/.bashrc
          
          • Add the following line to the file:
          export PATH=$PATH:/path/to/adb/folder
          
          • Press Ctrl + X, then Y, then Enter to save the file.
          • Run the following command:
          source ~/.bashrc
          
    • Finally, to check that your properly installed ADB, in the Android Studio Terminal (Control + F12 on Windows or ⌘ + F12 on Mac), or on your default/preferred terminal, run the following command:
    adb devices
    
    • If you see a message saying List of devices attached, you have successfully installed ADB (even if there are no devices attached).

Congratulations! You have successfully installed the necessary software to program an FTC robot. You can now start programming your robot.

Troubleshooting

  • If you have questions/issues with the installation process, the Unofficial FTC Discord has many experienced programmers who can help you with all sorts of issues, including installation issues.
  • Last Updated: 2024-05-30