The dependencies for developing for Android can be installed directly through the Unity Hub.
- Open the Unity Hub.
- Select Installs.
- Find the Editor you want to add Android build support to.
- Select the three dots to the right of the version label, then select Add Modules.
- In the Add Modules dialog, locate the Android Build Support, Android SDK & NDK tools, and Open JDK modules and tick its checkbox.
- When you have selected all the modules to add, select Done.
Note: If you didn’t install the Editor via the Hub, you will not see the option to Add Modules. To enable this option, install the Editor via the Hub.
Please follow the steps in Setup & installation and additionally select the Android Build Support, Android SDK & NDK tools, and Open JDK modules when installing Unity.
If you want to launch your game on a physical device, you need to:
- Ensure you have USB debugging enabled on it. See the Android developer documentation for guidance.
- Connect the mobile device to your computer using a USB cable. You might get a pop-up window on the device asking you to allow USB debugging. Select Yes.
- If you want to connect your device to a local deployment, ensure your computer and your mobile device are connected to the same network.
- Install Android Studio. At the Choose Components stage of the installation, be sure to select Android Virtual Device.
- Create an Android emulator by going to Tools > AVD Manager > Create Virtual Device. Ensure you choose the same CPU architecture for your virtual machine as your development machine to get the best performance.
Unity Remote is Unity's solution for faster mobile development iteration times. Check out Unity's documentation for more information and setup instructions.
Updated about a year ago