Setting up Android Development in Unity

If you wish to build the VRee Platform on Android devices, the Android module has to be installed. To do so, open up the Unity Editor and create a new project. Go to File > Build Settings… and click on the Android platform. If it says “No Android module loaded.”, the android module has not been installed (see figure below).

Click on the Open Download Page button, this will open the browser to the download page. Install the module and reopen Unity. The Build Settings window should now display the build settings for Android (see figure below).

It is now time to download the Java Development Kit (JDK) and Android Software Development Kit (SDK) in order to build to the Android device.

The JDK can be downloaded from the Oracle download page:

The easiest way to download the Android SDK is to download Android Studio

With the JDK and SDK installed, open Unity and go to Edit > Preferences… > External Tools. Under Android, the for the SDK path, enter: C:\Users\USERNAME\AppData\Local\Android\sdk. Be sure to replace USERNAME with your own. For the JDK path, enter: C:\Program Files\Java\jdk1.8.0_151

In order to support the VRee Platform, we need to make sure that the correct Android SDK API level is installed. We do this by opening the File > Build Settings… window, clicking on Android from the Platform list and pressing the Switch Platform button. Once Unity has finished switching to the Android platform, open the Player Settings by clicking on the Player Settings… button. Navigate to Other Settings > Identification and set the Minimum API Level to Android 4.4 ‘Kit Kat’ (API Level 19) .

Finally, click the Build button on the Build Settings window. If the API level was not installed with the Android SDK, Unity will ask us to update the Android SDK (see figure below). Click the Update Android SDK button to complete the process

More useful Android development tips can be found on the Unity documentation website:

If the following error is thrown: Unable to list target platforms. Please make sure the android sdk path is correct, the SDK need to be fixed.

Fixing the SDK is quite simple, download the following zip: Navigate to the SDK location (C:\Users\USERNAME \AppData\Local\Android\sdk) and rename the tools folder to tools-BAK. Unpack the zip to the SDK location, this puts the fixed tools folder in the SDK.

The Unity environment is now prepared for Android development.