While trying to create Android builds for testing on my mobile device, I ran into several issues which I'll share here and also give the solution to. As of this posting, I was using Unity 2018.1.02f
Android SDK Version
The first issue I encountered was with Unity not recognizing the Android SDK version.
I downloaded Android Studio and downloaded SDK Platform/Android 8.1 (API Level 27)
A bit of Google searching helped me find out that the 'tools' directory of the SDK was incompatible, and I had to download SDK Tools v25.2.5 from http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip (Source) and then replace the directory.
I downloaded Android Studio and downloaded SDK Platform/Android 8.1 (API Level 27)
A bit of Google searching helped me find out that the 'tools' directory of the SDK was incompatible, and I had to download SDK Tools v25.2.5 from http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip (Source) and then replace the directory.
ADB Issues
After getting a successful build, I was trying to install the .apk onto my device. Even with Android SDK and ADB properly installed, my device was not getting recognized with USB debugging. I took a quick look at my Device Manager and noticed that there was an issue with ADB.
I found the solution for manually installing and updating ADB at www.xda-developers.com/install-adb-windows-macos-linux/
I found the solution for manually installing and updating ADB at www.xda-developers.com/install-adb-windows-macos-linux/
Installing to Device thru USB Debugging
The last issue I encountered was a failure for installing onto my device with error messages mentioning that there is a file size mismatch. The issue was that I had my game .apk already installed from another machine with a different version, and the adb installer doesn't like that.
I'm assuming this is an issue because version and product info were unchanged, and it attempted an update. Don't quote me on that.
The solution was pretty simple: Delete the old version from the phone. Other developers also mention that the issue may be that the phone itself is out of space to store the game.
I'm assuming this is an issue because version and product info were unchanged, and it attempted an update. Don't quote me on that.
The solution was pretty simple: Delete the old version from the phone. Other developers also mention that the issue may be that the phone itself is out of space to store the game.