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()
3) 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
Answer by IndieGeek · Dec 20, 2016 at 04:46 AM
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
Answer by KvasbragStudios · Oct 12, 2016 at 11:39 AM
Have you enable the allow from unknown sources on your phone under lock screen and security?
Answer by Nauman111 · Jan 27, 2017 at 02:11 PM
Install Location set to automatic and uninstall all your existing games.
Your answer
Follow this Question
Related Questions
Building to mobile device & Unity permanently freezes in last step 1 Answer
No camera / images on Android build 1 Answer
Unable to merge Android manifests after making changes 0 Answers
Build and run nothing happend 0 Answers
Why does disconnecting my phone from my pc change the game version saved on my phone? 0 Answers