When you encounter the error 'Unable to install APK to device' it actually means that you don't have the right version of the Android SDK installed. I will show you how to analyse and resolve it.

Unity Android: Unable to install APK to device

When you have build your game in Unity it will try to deploy it to your connected devices. These might be an actual device or a simulator. Let us focus first on the simulator. Remember when you have created your AVD in the Android Studio AVD Manager tool? At that time you had to choose the system image to use like you can see below:

As you can see, the target (Android 9.0) is linked to an API level.

Try to launch this AVD using the terminal (Mac OS command prompt):

emulator -avd "nameofyouravd"

In my case it shows a warning like below:

And that is exactly the case. It tells you that you need to download a certain version of Android SDK in order to be able to deploy your game to this AVD.

When you launch Android Studio -> Tools -> SDK Manager, just check the API level (in my case 28) and click Install. After installation you should be able to deploy to your device.

In case you are encountering this issue with a connected device, you will need similar steps.

On your phone go the the settings, system settings, about phone and write down your android version. Then go to this Wiki page.

Or have a look at the image below:

Lookup your target API and follow the steps from above to download and install the SDK for that API level using Android Studio -> Tools -> SDK Manager.

Happy coding!