This guide describes how to install the Android Studio Development Bundle that you’ll use to build Oculus Android VR apps.
The Android Studio Development Bundle includes all the necessary tools you need to begin developing Android Applications:
If you’re planning to use a Mac for development, first install Xcode - https://developer.apple.com/xcode/download/. If you’re using another platform you can skip this installation.
Once Android Studio has been installed, you can then install the following packages:
These packages are installed through the Android SDK Manager. To access the manager, either navigate to Tools > SDK Manager or click the SDK Manager icon in the toolbar ( ). If you do not have a project loaded you may navigate to Configure > SDK Manager.
Verify that the correct packages and versions have been installed
In the Android SDK Manager, select the SDK Platforms tab. Verify the following Android platform is installed, as it is the minimum version required by the SDK: <!--
Then select the SDK Tools tab. Verify that the NDK and LLDB components are installed, and that the Android SDK Build Tools 28.0.3 (or later) are installed.
Note:LLDB may not be present depending on Android Studio version.
Please refer to the following pages for information about Android NDK (https://developer.android.com/studio/projects/add-native-code.html#download-ndk) and OpenJDK (https://developer.android.com/studio/intro/studio-config.html#jdk).
Once you’ve finished installing the required packages, you can configure your development environment.
Android Studio Project Structure
To verify your settings in Android Studio, navigate to File > Other Settings > Default Project Structure > Android SDK Location. If you do not have a project loaded, navigate to Configure > Default Project Structure > Android SDK Location.
If present, verify that Use embedded JDK is checked and that the following properties are set to appropriate values:
Make note of these locations, as you’ll use them to set your environmental variables in the next section.
Environment Variables and Path
With the locations recorded in the previous step, set the following environment variables:
C:\Program Files\Android\Android Studio\jre.
C:\Program Files\Android\Android Studio\jre\bin.
You must set up your system to detect your Android device over USB in order to run, debug, and test your application on an Android device.
You may need to install a USB driver for ADB after installing the Android SDK. The driver and installation instructions can be found on the Downloads page.
Windows may automatically detect the correct device and install the appropriate driver when you connect your device to a USB port on your computer.
Access the Device Manager through the Windows Control Panel. If the device was automatically detected, it will show up under Portable Devices in the Device Manager. Otherwise, look under Other Devices in the Device Manager and select the device to manually update the driver.
To see the list of detected attached devices, enter the following at a command prompt:
Note: You will need to successfully set up your Android development environment in order to use this command.
If the device does not show up, verify that the device is turned on with enough battery power and that the driver is installed properly.