In order to develop Android applications, you must have the following software installed on your system:
Gradle installation is recommended but not required. See Gradle for more information.
The Java Development Kit is a prerequisite for Android Studio and Gradle.
The latest version which has been tested with this release is JDK 8u91, available from the Java Archive Downloads page: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html
The latest JDK version is available here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Once downloaded and installed, add the environment variable JAVA_HOME and set its value to the JDK install location. For example, the value may be C:\Program Files\Java\jdk1.8.0_91, if you have installed the x64 version.
Based on the default installation path of Java SE 8u91, the correct syntax when using set from the command line is:
set JAVA_HOME=”C:\Program Files\Java\jdk1.8.0_91”
Additionally, add the JDK to the value of your PATH, e.g. C:\Program Files\Java\jdk1.8.0_91\bin
To use Android Studio as your primary IDE, download the Android Studio Bundle from the following location: https://developer.android.com/studio/index.html
The Android Studio Development Bundle includes the basic tools you need to begin developing Java Android Applications:
Once downloaded, refer to the readme.txt included with the Android SDK, or follow Android’s installation instructions: https://developer.android.com/studio/install.html?pkg=studio
Some developers may wish to develop mobile VR applications without using Android Studio.
This section describes how to set up for development using the basic set of tools needed for development using the standalone Android SDK and Gradle.
You must download additional packages required by the Mobile SDK via the Android SDK Manager, found in Tools > Android > SDK Manager. Android Studio may prompt you to take this step automatically the first time you launch it.
To launch the Android SDK manager, double-click the SDK Manager.exe file at the root of the SDK Tools Package location.
The following packages are required for native development:
Once the Android SDK is installed, launch the SDK Manager to verify that you have installed the latest stable SDK Tools, Platform-tools, and Build-tools. Also verify that you have at least one SDK Platform-tools installed, preferably the one you intend to target with your application.
The Android Native Development Kit (NDK) is a toolset that allows you to implement parts of your app using native code languages such as C and C++. It is used extensively by the sample applications included with this release.
The last version of the NDK known to work with the Mobile SDK is r13b.
Gradle is a build automation suite used by our standalone build scripts and by Android Studio to manage dependencies and allow for custom build logic. Gradle replaces the previous Android build system, Ant, which is now deprecated for use in Android development.
It is not necessary to install Gradle to use the Mobile SDK. Oculus Mobile SDK 1.0+ build scripts use the Gradle Wrapper (gradlew), a small wrapper that automatically downloads and installs Gradle the first time you build a project. However, if you wish to install the full version of Gradle, we have included instructions.
The latest version which has been tested with this release is Gradle 2.10. Choose the Complete download if you want the Gradle source and offline documentation.
To install Gradle:
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.
If you are developing on Windows, you may need to install a USB driver for adb after installing the Android SDK. For an installation guide and links to OEM drivers, see the Android OEM USB Drivers document.
Samsung Android drivers may be found on their developer site: http://developer.samsung.com/android/tools-sdks/Samsung-Android-USB-Driver-for-Windows
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.
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.