0
\$\begingroup\$

I got this error message when trying to build and run on Android actual device.

enter image description here

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 devPlayer, Boolean retryUpload)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options)
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.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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
UnityEditor.HostView:OnGUI()

Why it happens? Please advice. Thank you.

\$\endgroup\$
  • 1
    \$\begingroup\$ I've only seen this error when trying to re-install a project that was previously built with a much older ADK version. Uninstalling from the device fixed that problem. \$\endgroup\$ – rutter May 27 '15 at 15:26
  • \$\begingroup\$ Check the Unity console and adb logcat output for messages. \$\endgroup\$ – fadden May 29 '15 at 18:14
  • \$\begingroup\$ Try set Player Settings -> Install Location to Automatic. \$\endgroup\$ – attolee Mar 14 '18 at 6:33
1
\$\begingroup\$

Presumably you hit "Build and Run"; that will cause Unity to first generate the APK, and then attempt to automatically install that on the connected device. Personally I recommend "Build" to just generate the APK and save it somewhere; then you can install it yourself after the APK is generated.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I already done that. When I try installing the APK file, it said "App not installed". Why? \$\endgroup\$ – Mohammad Nurdin May 28 '15 at 7:47
  • 2
    \$\begingroup\$ Unfortunately there are a million reasons why that could be, it's a pretty vague error message. Google that message for lots of possibilities to try. For starters, try uninstalling any previous apps you've built and install this one from scratch. Because of how Android handles app credentials, it's possible for an older app to prevent the installation of a new app if the credentials collide. \$\endgroup\$ – jhocking May 28 '15 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.