- Home /
Why does my Mac build to Android fail? "Unable to install apk!"
Working with a friend to build an application on her Mac. After several successful builds to the Android device, Unity has begun to fail to transfer the .apk to the tablet.
The pop-up error is "Unable to install apk!" "Installation failed. See the Console for details."
In the console, I find the following error message:
UnityException: Unable to install APK!
Installation failed. See the Console for details.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex)
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message)
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuildPointToConsole (System.String title, System.String message)
UnityEditor.Android.PostProcessor.Tasks.PublishPackage.UploadAndStartPlayer (UnityEditor.Android.PostProcessor.PostProcessorContext context, Boolean retryUpload)
UnityEditor.Android.PostProcessor.Tasks.PublishPackage.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
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
Please note: The tablet and Unity were working fine before this issue cropped up, and neither the tablet nor Unity have been updated over the last few days.
Does anybody know how I can fix this? Thanks in advance,
--Rev
ADDITIONALLY: Does anybody know how I can look at the tablet's memory while it's connected to the Mac (ie. with Finder)? I'd like to be able to manually remove and install .apks to the tablet.
Try uninstalling the app from tablet and then run again from Unity.
Answer by SunnyChow · Oct 11, 2016 at 02:43 AM
Did you turn on the developer mode in your tablet? Have you receive a panel in your tablet asking if it should trust the computer? Do your need extra driver for your computer to connect it (i know some phone need driver for pc)?
Thanks for the response Sunny!
Did you turn on the developer mode in your tablet?
Yes. As stated in the question above, we had several successful builds running on the Android tablet before we ran into this issue.
Have you receive a panel in your tablet asking if it should trust the computer?
I don't believe this message has come up on the tablet (I'll ask my friend if she encountered this), but as stated above, we've already had several successful builds transfer to the tablet and run, so trust would have been established between tablet and mac.
Do your need extra driver for your computer to connect it (i know some phone need driver for pc)?
As far as I can tell, the tablet is connecting to the computer just fine, as both the $$anonymous$$ac and Unity see the device (otherwise the .apk wouldn't build). The problem is that Unity seems to be failing to transfer the .apk, as per the error messages printed above.
I appreciate the help! Any other ideas (or a full solution!) would be much appreciated!
Have you tried just building the apk in Unity and then using adb to transfer and/or install? Even if it fails, it might provide more helpful feedback.
EDIT: (just noticed your "additionally"). You should find the adb command-line utility in your android sdk folders. You can use that to transfer & install, and to inspect the device's file system from the mac.
Erk. Okay. Not sure either of us are rated for using command-line utilities (well, I've had some experience, but not on $$anonymous$$acs). I'm helping out via Skype, so this is going to be fun. Any chance you have a reference page you could recommend to me?
$$anonymous$$any thanks, appreciate your advice...!
--Rev