# 012 how-to: get started on macOS :::{figure} ../_static/figures/fig-l012-built.png :name: fig-l012-built ::: Put the robot's code on a Mac and build it. After this, every lesson starts in Android Studio with the project open. ::::{only} mentor **Before you start.** - A Mac, signed in to an account that may install programs. - The internet. - No robot and no gamepad are needed. Nothing else has to be installed first. Android Studio fetches Java 17 for the project by itself, and git is installed in L012S040 when macOS asks for it. :::: ## the steps ### H012S010: install Android Studio The robot's code is written in Android Studio. The team uses one version of it, **Quail 4**, so everyone sees the same screens. It is not the newest, so it comes from the page of older versions. **Chip.** Click the Apple menu, then **About This Mac**. It shows whether the Mac has an Apple chip or an Intel chip. The files below differ for each. **Download.** {.steps} - Open and click **I agree** under the terms. - Click **Android Studio Quail 4 | 2026.1.4 Patch 1** to open it. - Click the file for your Mac: `android-studio-quail4-patch1-mac_arm.dmg` for an Apple chip, or `android-studio-quail4-patch1-mac.dmg` for an Intel chip. It is about 1.5 GB. If Safari asks to allow downloads, click **Allow**. :::{figure} ../_static/figures/fig-l012-archive.png :name: fig-l012-archive ::: **Install.** {.steps} - Open the downloaded file. - Drag Android Studio onto the Applications folder. - Start Android Studio from Applications. If macOS says it came from the internet, click **Open**. :::{figure} ../_static/figures/fig-l012-applications.png :name: fig-l012-applications ::: **Check.** - Android Studio starts and asks to *Help improve Android Studio*. Click **Don't send**. ### H012S020: let Android Studio fetch what it needs The first time it starts, Android Studio's setup wizard downloads the Android tools the code is built with. **Setup.** {.steps} - Click **Next** on *Welcome*. - Pick **Standard** and click **Next**. - Click **Next** on *Verify Settings*. - Click each license on the left, pick **Accept**, and click **Next**. - Wait while it downloads, then click **Finish**. :::{figure} ../_static/figures/fig-l012-wizard-standard.png :name: fig-l012-wizard-standard ::: **Check.** - The last page of the wizard reads *Android SDK is up to date*. - *Welcome to Android Studio* opens, with **New Project**, **Open** and **Clone Repository**. If a note says *Rabbit 1 available*, leave it. The team stays on Quail 4. ### H012S030: install AdvantageScope AdvantageScope draws what the robot is doing: where it is on the field, and graphs of its numbers. **Download.** Open . Under **Assets**, click the file for your Mac: - an Apple chip: `advantagescope-mac-arm64-v26.0.2.dmg` - an Intel chip: `advantagescope-mac-x64-v26.0.2.dmg` **Install.** Open the file. Drag AdvantageScope onto the Applications folder. Start it from there. If macOS asks, click **Open**. **Check.** - AdvantageScope opens on its **Line Graph** tab, with *No data available* on the left. :::{figure} ../_static/figures/fig-l012-advantagescope.png :name: fig-l012-advantagescope ::: ### H012S040: get the project The robot's code lives on GitHub. Android Studio copies it to the laptop with a tool called **git**. **Git.** {.steps} - On *Welcome to Android Studio*, click **Clone Repository**. It says *Git is not installed*. - macOS asks whether to install the command line developer tools. Click **Install**, then **Agree**, and wait for it to finish. - Quit Android Studio with **⌘Q**, and start it again from Applications. :::{figure} ../_static/figures/fig-l012-tools.png :name: fig-l012-tools ::: **Clone.** {.steps} - On *Welcome to Android Studio*, click **Clone Repository**. - Into **URL**, type `https://github.com/msb-stitt/ftc31459-26-27-biobuzz`. Leave **Directory** as it is. - Click **Clone**. **Trust.** When it asks *Trust and Open Project*, click **Trust Project**. :::{figure} ../_static/figures/fig-l012-trust.png :name: fig-l012-trust ::: **Check.** - The project opens, and the Project window lists `FtcRobotController` and `TeamCode`. ::::{only} mentor **If it didn't**, and *Git is not installed* stays after the tools finish, Android Studio has not looked again. Quit it with ⌘Q, not just its window, and start it again. :::: ### H012S050: answer what Android Studio offers While the project loads, Android Studio reads it with **Gradle**, the tool that builds the code. This is called a *sync*. The first sync downloads Java 17 and more, and takes a few minutes. **Answer.** Notes pop up in the bottom right while it works. Answer each one like this: - **Agent Mode now available**: click **Do not show again**. The lessons do not use an AI helper. - **Project update recommended**, *Android Gradle plugin version 8.13.2 has an upgrade available*: click **More**, then **Don't ask for this project**. The project needs version 8.13.2, so do not upgrade it. - If macOS asks whether Android Studio may find devices on the local network, click **Allow**. :::{figure} ../_static/figures/fig-l012-offers.png :name: fig-l012-offers ::: :::{figure} ../_static/figures/fig-l012-agp-more.png :name: fig-l012-agp-more ::: **Check.** - The Build window's **Sync** tab has a green tick beside the project. - Open **Android Studio → Settings**. Type `Gradle` in its search box and click **Gradle** under **Build Tools**. Under *Gradle JVM criteria*, **Version** reads `17`. :::{figure} ../_static/figures/fig-l012-gradle-jvm.png :name: fig-l012-gradle-jvm ::: ### H012S060: build the code **Build.** Click **Build → Assemble Project**. The first build takes a few minutes. :::{figure} ../_static/figures/fig-l012-build-menu.png :name: fig-l012-build-menu ::: **Check.** - The Build window's **Build Output** tab ends with *BUILD SUCCESSFUL* and *63 actionable tasks: 63 executed*. ::::{only} mentor **What you just did.** Android Studio is where the code is written, and Gradle turns the code into an app for the robot. Clone copied the team's repository from GitHub onto the laptop. The sync read the project's Gradle files and downloaded what they ask for: Gradle 8.14.3, the Android Gradle plugin 8.13.2 and Java 17 among them. Assemble Project built `FtcRobotController` and `TeamCode` into `TeamCode-debug.apk`, the app that is sent to the robot. **Where next.** [L020](l020.md) copies the first starter into `mytry` and reads the gamepad's sticks. ::::