How to configure Unity to build Android Game

This tutorial is to be an easy way to configure your PC and Android Cellphone to be able to create a mobile game.

  1. Install on your Android the Unity Remote App
  2. You need to enable Developer mode on your Android

    If you are using a motorola Android, then you go to settings -> about phone -> Version Number -> tap 7 times and add your pin.

  3. Enable USB Debugging

    If you are using motorola Android, then go to settings -> system -> advanced -> developer options -> USB Debugging.

  4. Download Android Studio

    You must install de Android SDK

  5. Change Building Settings on Unity

    Go to File -> Building Settings -> Android -> Switch Platform If you don’t have Android build installed, you can click on Install with Hub to download.

  6. Add Android SDK on Unity

    Go to Preferences -> External Tools -> Android SDK -> Browse. If it goes well, Unity will add automaticly. If don’t, then just browse to the Android SDK folder. In later versions of Unity (2020+) it will automaticly add that.

    If this error message appears:

    Android SDK missing

    Then go to Unity Hub -> Installs -> Add Modules -> Android Build Suport -> Check Android SDK and OpenJDK -> Done. It will install the necessary SDKs for building you Android Game.

    Android Build Suport on Unity Hub

  7. Add your Device to test

    Edit -> Project Settings -> Editor -> Device -> Any Android Device

  8. Press play on Unity Editor.

    Your game will show on your Android Device.

References