Troubleshoot Android XR Emulator issues for AI glasses

Applicable XR devices
This guidance helps you build experiences for these types of XR devices.
AI Glasses

You might encounter issues while creating virtual AI glasses devices or running your app's augmented experiences on the emulator. If you do encounter issues, see the sections on this page for help resolving common issues.

Some errors have multiple possible causes. This document lists some common errors and their fixes, but you might encounter the same error message for a different reason.

Can't pair emulators using Pairing Assistant

While pairing the emulators using the Pairing Assistant, the process fails.

Cause

The Pairing Assistant can't find both emulators or is having another issue while pairing.

Fix

Follow these steps to manually pair the emulators on the phone AVD:

  1. In the Android Studio Device Manger, find the AI glasses AVD that you created and click Start.

    Click

  2. Check that the AI Glasses AVD has fully launched. You'll see a "Pair phone to ..." message.

    The AI Glasses AVD has fully
launched.

  3. In the Android Studio Device Manger, find the phone AVD that you created to act as a host device for the AI glasses emulator, and click Start .

    Click

  4. Check that the phone emulator has fully launched by waiting until you see the Home screen.

  5. On the phone emulator, launch the Glasses app

    The app icon for the Glasses
app.

  6. Select Set up Glasses.

    The app screen that shows the virtual devices are ready to
pair.

  7. When prompted, select Grant permissions and accept the permissions request required by the Glasses Core app.

    Grant the permissions required in the app.

    Accept the permissions request from the app.

  8. Select Begin Pairing on each app screen when prompted.

    Select Begin Pairing on the first app screen.

    Select Begin Pairing on the second app screen.

  9. Select the AI glasses AVD from the list of devices.

    The emulators now attempt to pair the devices.

    Select the AI glasses AVD from the list that
displays.

  10. During pairing, accept the association requests for both the Glasses and Glasses Core apps.

    The association request for the Glasses app.

    The association request for the Glasses Core app.

  11. Select Next to finish the pairing process.

Emulator for AI glasses not pairing

While pairing the emulators, you encounter a message that says "Disconnected" or "Couldn't pair glasses" and the emulators won't pair.

The "Disconnected" message indicates an issue with pairing.

You might see this message in the Glasses app if there are issues while pairing.

Cause

The glasses emulator isn't in pairing mode.

Fix

  1. Stop the AI glasses emulator.
  2. In the Android Studio Device Manger, find the AI glasses AVD and click Wipe Data in the overflow menu.

    Click "Wipe Data" to start the AI glasses emulator while wiping user
data.

Paired emulators don't reconnect devices on relaunch

After initial pairing, the emulators don't reconnect the devices to each other when launched.

Cause

A connectivity issue is stopping the devices from reconnecting.

Fix

First, try the following method:

  1. Stop the phone emulator and the AI glasses emulator.
  2. In the Android Studio Device Manger, find the phone AVD and click Cold Boot in the overflow menu.

    Click "Cold Boot" to start the phone emulator with a cold
boot.

  3. Wait for the phone emulator to fully boot, and then relaunch the AI glasses emulator.

If this method doesn't work, follow these steps:

  1. Stop the AI glasses emulator.
  2. In the Android Studio Device Manger, find the AI glasses AVD and click Wipe Data in the overflow menu.

    Click "Wipe Data" to start the AI glasses emulator while wiping user
data.

  3. On the phone emulator, launch the system Settings app.

  4. Select Connected devices.

  5. Find the AI glasses device and select Device details.

  6. Select Forget > Forget device.

  7. Pair the devices again.

AI glasses won't associate with phone

During pairing, the AI glasses won't associate with the phone.

Cause

A connectivity issue is stopping the Glasses Core app from detecting the AI glasses.

Fix

First, try forgetting the Bluetooth device and re-pairing:

  1. On the phone emulator, launch the system Settings app.
  2. Select Connected devices.
  3. Find the AI glasses device and select Device details.
  4. Select Forget > Forget device.
  5. Pair the devices again.

If this method doesn't work, follow these steps:

  1. Stop the AI glasses emulator.
  2. In the Android Studio Device Manger, find the AI glasses AVD and click Wipe Data in the overflow menu.

    Click "Wipe Data" to start the AI glasses emulator while wiping user
data.

Projected activity won't launch on emulator

Your projected activity won't launch on the AI glasses emulator.

Cause

An issue is preventing the activity from being projected to the display.

Fix

Follow the same troubleshooting steps as when the emulators don't reconnect the devices on relaunch.

Can't use Gemini Live on the AI glasses emulator

While trying to use Gemini Live on the AI glasses emulator, you see the following messages:

A message that says the user isn't allowlisted for Gemini.

A message that says something went wrong.

Cause

The Google app needs to be updated to the latest version (minimum required version is 16.46.63) on the phone emulator.

Fix

  1. In the Android Studio Device Manger, find the phone AVD that you created to act as a host device for the AI glasses emulator, and click Start .

    Click

  2. Open the Google Play Store app.

  3. Search for "Google" and select the Google app.

    Update the Google app from the Google Play Store app.

  4. Select Update.

See also