> For the complete documentation index, see [llms.txt](https://docs.cb21829.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cb21829.org/ftc-java-beginner-guide/setting-up-your-environment.md).

# Setting up your environment

### Install Android Studio

1. Download **Android Studio** from `developer.android.com/studio` and install it.
2. On first launch, let it download the Android SDK components it requests.

### Get the FTC SDK

You have two options.

**Option A — Clone with Git:**

```bash
git clone https://github.com/FIRST-Tech-Challenge/FtcRobotController.git
```

**Option B — Download ZIP:** Use the latest source ZIP from the [FtcRobotController releases](https://github.com/FIRST-Tech-Challenge/FtcRobotController/releases).

Always start from the latest official release.

### Open and build

1. In Android Studio, go to **File → Open**.
2. Select the `FtcRobotController` folder.
3. Wait for Gradle sync to finish.

The two modules that matter are:

* **`FtcRobotController`** — the SDK. Do not edit it.
* **`TeamCode`** — your code lives here.

### Deploy to the robot

1. Connect the Control Hub to your computer.
2. Select the **`TeamCode`** run configuration.
3. Choose the Control Hub as the target.
4. Press **Run**.

On the Driver Station, connect to the Robot Controller Wi-Fi network. Your OpModes then appear in the TeleOp and Autonomous lists.

### Configure the robot

The code refers to hardware by **name strings** like `"frontLeft"`. Those names come from the robot configuration on the Driver Station.

1. On the Driver Station, open **⋮ → Configure Robot → New**.
2. Select each hub and configure each port.
3. Give every device the correct type and exact name.
4. Save and **Activate** the configuration.

The config name must exactly match the string in your code. This is the most common cause of `device not found` errors.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cb21829.org/ftc-java-beginner-guide/setting-up-your-environment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
