This is quick guide to all things you need to do before start Unity Android development. I gathered there things that I was always looking for and didn’t found on Unity documentation. From step where those instructions would double you’ll be pointed to proper documentation page.
If you want to develop for Android you will need to install Java and set environment variables.
Open the Oracle website and download newest JDK.
On the next view choose your version (Windows?):
Then click through Java installer.
For Android / Unity purposes its only required to set up
PATH variable. To do this you can install useful program called Patheditor. Otherwise, you can google how to setup
PATH environment variable.
If you would like to setup other environment variables for Java here are the examples:
JAVA_HOME : C:\Program Files\Java\jdk1.8.0_112 JDK_HOME : %JAVA_HOME% JRE_HOME : %JAVA_HOME%\jre CLASSPATH : %JAVA_HOME%\lib;%JAVA_HOME%\jre\lib PATH : other-entries;%JAVA_HOME%\bin
Make sure that
PATH doesn’t contain references to another Java installation directory.
3. Download Android SDK.
Go to the bottom of the website and find Get just the command line tools section. We don’t need Android Studio here. Choose command line tools like on the image below:
Unzip this to desired SDK location.
Now we need to install Android components. We are not using Android Studio so we will need to run console.
To install those things we will use console tool called ‘sdkmanager.bat’. It is inside
\tools\bin\ directory of
[Your AndroidSDK location] — in my example it was directly in custom folder on
If you would like to check newest packages versions simply run
sdkmanager.bat --list command.
To run scripts in
*.bat you need to enter command line. To do this get into
[AndroidSDK]\tools\bin\ and in directory bar write
cmd like on gif below:
Don’t rely on versions below — those was newest while I was writing this tutorial.
Install required packages like this:
sdkmanager.bat platforms;android-27 sdkmanager.bat platform-tools sdkmanager.bat build-tools;27.0.1 sdkmanager.bat extras;google;usb_driver
Edit/Preferences/External tools and setup paths according to locations you have choosen:
That’s it. Now you can proceed with steps from Unity documentation. From third step or so.
… a few steps further. You are ready to become Unity Android Developer! Take a look below for even better start.