<br />


Applicable XR devices This guidance helps you build experiences for these types of XR devices. [Learn about XR device types →](https://developer.android.com/develop/xr/devices) ![](https://developer.android.com/static/images/develop/xr/xr-headsets-icon.svg) XR Headsets [](https://developer.android.com/develop/xr/devices#xr-headsets) ![](https://developer.android.com/static/images/develop/xr/xr-glasses-icon.svg) Wired XR Glasses [](https://developer.android.com/develop/xr/devices#xr-glasses) ![](https://developer.android.com/static/images/develop/xr/ai-glasses-icon.svg) Audio \&  
Display Glasses [](https://developer.android.com/develop/xr/devices#audio-display) [Learn about XR device types →](https://developer.android.com/develop/xr/devices)

<br />

Before you can start building, you need to set up the Jetpack XR SDK. Follow
the steps in each section to set up your development environment with the SDK.

## Check Android SDK compatibility

The Jetpack XR SDK requires your app to use an Android [`minSdk`](https://developer.android.com/build#min-sdk) of 24 and a
[`compileSdk`](https://developer.android.com/build#compile-sdk) of 34 or higher.

## Add library dependencies

The dependencies that your app requires depend on the types of experiences and
XR devices that you are building for. See the following sections for more
information about adding the dependencies for your app.

### Add library dependencies for immersive experiences (XR headsets and XR glasses)

First, see the following reference guides to understand necessary dependencies
and compatibility issues for each of the required libraries:

- [XR Runtime](https://developer.android.com/jetpack/androidx/releases/xr-runtime)
- [Jetpack SceneCore](https://developer.android.com/jetpack/androidx/releases/xr-scenecore)
- [Jetpack Compose for XR](https://developer.android.com/jetpack/androidx/releases/xr-compose)
- [Material Design for XR](https://developer.android.com/jetpack/androidx/releases/xr-compose-material3)
- [ARCore for Jetpack XR](https://developer.android.com/jetpack/androidx/releases/xr-arcore)

Then, add the necessary dependencies to your app's `build.gradle.kts` file:


### Groovy

```groovy
dependencies {
    implementation "androidx.xr.runtime:runtime:1.1.0-alpha02"
    implementation "androidx.xr.scenecore:scenecore:1.1.0-alpha01"
    implementation "androidx.xr.compose:compose:1.0.0-beta02"
    implementation "androidx.xr.compose.material3:material3:1.0.0-alpha17"
    implementation "androidx.xr.arcore:arcore:1.1.0-alpha01"
}
```

### Kotlin

```kotlin
dependencies {
    implementation("androidx.xr.runtime:runtime:1.1.0-alpha02")
    implementation("androidx.xr.scenecore:scenecore:1.1.0-alpha01")
    implementation("androidx.xr.compose:compose:1.0.0-beta02")
    implementation("androidx.xr.compose.material3:material3:1.0.0-alpha17")
    implementation("androidx.xr.arcore:arcore:1.1.0-alpha01")
}
```

#### Enable code minification (optional)

If you want to enable code minification and obfuscation using ProGuard for your
builds, you must also add a dependency on the Android Extensions for XR library.
This is required for projects using Jetpack XR `alpha05` or newer.

Add the following `compileOnly` dependency to your module's `build.gradle.kts`
file:

### Groovy

```groovy
dependencies {
    // ... other dependencies
    compileOnly "com.android.extensions.xr:extensions-xr:1.4.0"
}
```

### Kotlin

```kotlin
dependencies {
    // ... other dependencies
    compileOnly("com.android.extensions.xr:extensions-xr:1.4.0")
}
```

> [!CAUTION]
> **Caution:** You must use `compileOnly` for this dependency. Using `implementation` or `api` will cause your app to break at runtime.

### Add library dependencies for augmented experiences (audio and display glasses)

First, see the following reference guides to understand necessary dependencies
and compatibility issues for each of the required libraries:

- [XR Runtime](https://developer.android.com/jetpack/androidx/releases/xr-runtime)
- [ARCore for Jetpack XR](https://developer.android.com/jetpack/androidx/releases/xr-arcore)
- [Jetpack Compose Glimmer](https://developer.android.com/jetpack/androidx/releases/xr-glimmer)
- [Jetpack Projected](https://developer.android.com/jetpack/androidx/releases/xr-projected)

Then, add the necessary dependencies to your app's `build.gradle.kts` file:

### Groovy

    dependencies {
        implementation "androidx.xr.runtime:runtime:1.1.0-alpha02"
        implementation "androidx.xr.glimmer:glimmer:1.0.0-alpha22"
        implementation "androidx.xr.glimmer:glimmer-google-fonts:1.0.0-alpha22"
        implementation "androidx.xr.projected:projected:1.0.0-alpha14"
        implementation "androidx.xr.arcore:arcore:1.1.0-alpha01"
    }

### Kotlin

    dependencies {
        implementation("androidx.xr.runtime:runtime:1.1.0-alpha02")
        implementation("androidx.xr.glimmer:glimmer:1.0.0-alpha22")
        implementation("androidx.xr.glimmer:glimmer-google-fonts:1.0.0-alpha22")
        implementation("androidx.xr.projected:projected:1.0.0-alpha14")
        implementation("androidx.xr.arcore:arcore:1.1.0-alpha01")
    }

> [!NOTE]
> **Note:** While developing for audio and display glasses, use these stated library versions even if newer versions of these Jetpack libraries have already been released.