Unable to build Android APK in UNITY 5?

Greetings Gamers! Im having trouble building my ANDROID APK! Not to sure what are the reasons or reasons. After switching platforms to ANDROID and messing with some PLAYER SETTINGS. I still get this message in the CONSOLE as an error and it does not finalize and build my APK!?!

3 Console Message:

  1. Installation failed with the following output:
    pkg: /data/local/tmp/Package.apk

Failure [INSTALL_FAILED_MEDIA_UNAVAILABLE]

2)UnityException: Unable to install APK!
Installation failed. See the Console for details.
UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message, System.Exception ex)
UnityEditor.Android.PostProcessAndroidPlayer.ShowErrDlgAndThrow (System.String title, System.String message)
UnityEditor.Android.PostProcessAndroidPlayer.UploadAndStartPlayer (System.String manifestName, System.String stagingArea, UnityEditor.Android.AndroidDevice device, System.String packageName, Boolean developmentPlayer, Boolean retryUpload)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

  1. Error building Player: UnityException: Unable to install APK!
    Installation failed. See the Console for details.

I’m running WINDOWS 10…

With UNITY 5…

I have my Samsung Galaxy light running ANDROID 4.4.2 and have developer options enabled with STAY AWAKE ON, USB DEBUGGING ON, & ALLOW MOCK LOCATIONS.

On MY COMPUTER, DEVICE MANAGER - I have my ANDROID ADB INTERFACE ENABLED.

On Right click MY COMPUTER, PROPERTIES, ADVANCED SYSTEM SETTINGS, ENVIRONMENT VARIABLES, in the SYSTEM VARIABLES…I have created and set JAVA_HOME to my JDK 1.7.0_80 folder.

I have REMOTE 4 APP installed on my phone and in test/Play mode it works and tests just fine.

Running out of options and not to sure what it could be. Any help is good! Thank you!
I

SOLVED!!! There are different tricks that works for this type of error, for example

  • Delete some apps to give your storage some space or
  • Uninstall the existing app from your device.

But the way that worked for me is to go into File > Build Settings > Player Settings. Expand tab of Other Settings and change Install Location to Automatic.

Unity 5.4

Have you enable the allow from unknown sources on your phone under lock screen and security?

Install Location set to automatic and uninstall all your existing games.