- Home /
CommandInvokationFailure: Unable to install APK to device
Every time I test it on a device, I check everything on the installation if it is okay. I check the Android SDK directory, get updates on SDK, I plugged the USB onto the device, I enabled the USB Debugging on device, and ADB is set. I also add current scene to be built and when I build and run onto the device creating an APK to preview the program, I get this error message:
Error building Player: CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
C:/Users/OpenovateLabsUser/Desktop/Workspace/Softwares/Programming Softwares/Eclipse/Add Ons/android-sdks\platform-tools\adb.exe -s 0123456789ABCDEF install -r "C:\Users\OpenovateLabsUser\Desktop\Workspace\Projects\Experimental Projects\Other Unity Tests\AR\Temp\StagingArea\Package.apk"
stderr[
failed to copy 'C:\Users\OpenovateLabsUser\Desktop\Workspace\Projects\Experimental Projects\Other Unity Tests\AR\Temp\StagingArea\Package.apk' to '/data/local/tmp/Package.apk': No space left on device
]
stdout[
rm failed for /data/local/tmp/Package.apk, No such file or directory
]
The thing I don't understand is that my SDK appeared to be not installed and accused for not configuring in the Editor. I even take some changes in Player Settings, including the keystore. What should I do in order to check something else to fix this build error? Was it on the device USB? Should I go again for the SDK directory again?
Hi,
Create split apk which will give you .apk and .obb file.
Install apk in device
Copy the obb file to the folder "/Sdcard/obb/yourpackagename"
open the installed game
$$anonymous$$ake sure to name the .obb file with respect to the version code of your game(available in player settings->other settings) Name should be like this "main.versioncode.yourpacakgename.obb" If the folder doesnot exist in sd card try searching for it in internal memory of device.
Hope this may help you. Nsks
Answer by MrCranky · Aug 17, 2014 at 03:28 PM
"No space left on device"
This suggests your app is too large for your device.
As noted in a comment to other answers below, it's important to make the distinction between how much space is free on internal storage and external storage. I believe Unity wants to install the APK by default to internal storage. However, if you have 'split application binary' checked in the Player Android settings, then it will generate two files, a smaller APK and an OBB file with the remaining data. The APK will still be installed to internal storage, but the OBB will be installed to external storage (your SD card). Both storage areas need to have sufficient space to hold the app or you will get this error.
Answer by DCrosby · Sep 21, 2015 at 09:31 PM
Turning on / off Splitting the Application Binary Seems to cause this for me, the question is WHY ? I un-Installed the combined one, so I'm confused as to why it wouldn't work with both separately.
So, two things. First: did it definitely say "No space left on device" in the 'failed to copy' line (line 7 in the original question listing)? "CommandInvokationFailure: Unable to install AP$$anonymous$$ to device" could be caused by a whole bunch of things, but you do need the specific detail of the stdout from the command to guide you as to what went wrong.
If it did say 'No space left on device', then I'd suggest that it might be because you have plenty of internal storage space, but little/no external storage space free. Splitting the app generates a small AP$$anonymous$$ file (the executable and core data) and a larger OBB (your assets, generally). The AP$$anonymous$$ file can go into internal or external storage, but the OBB must be placed into external storage. So if you have lots of internal storage, a large non-split AP$$anonymous$$ file might live quite happily there, but a split app might be refusing to install because there's no room on the external storage for the OBB.
This is what I see, except I did a search of the /obb/com.Dev.Application folder and it's not a directory, even if it was, so what I'm trying to make a file... as a matter of fact the folder is empty... and I have 13GB free on the 32GB S6, and my app is 176 $$anonymous$$B's all-in, with the obb.
Error building Player: CommandInvokationFailure: Unable to push local file to device. Please make sure the Android SD$$anonymous$$ is installed and is properly configured in the Editor. See the Console for more details. C:/NVPAC$$anonymous$$/android-sdk-windows\platform-tools\adb.exe -s 03157df39452521a push "E:\DD_SVN\Application\Temp\StagingArea\main.obb" "/mnt/shell/emulated/obb/com.Dev.Application/main.1.com.Dev.Application.obb"
stderr[ failed to copy 'E:\DD_SVN\Application\Temp\StagingArea\main.obb' to '/mnt/shell/emulated/obb/com.Dev.Application/main.1.com.Dev.Application.obb': Is a directory ] stdout[
]
Answer by Jovaan · Oct 18, 2018 at 12:02 PM
For me, LG top phone from 2015 did not ever accept upload from USB 3 port (not hub, port directly on motherboard). All drivers were OK and device was recognized, but upload the binary always failed with "peer reset connection" etc.
Simply swtching the plug to USB 2 port repaired the issue. It is worth trying all USB ports on the machine before suspecting drivers, sdk or jdk etc.
Answer by jaweherncir · Apr 29, 2020 at 10:39 AM
I need a help please
CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details. C:\Users\LENOVO\AppData\Local\Android\sdk\platform-tools\adb.exe -s "AGY7N19312001479" install -r -d "C:\Users\LENOVO\Documents\Ather MethodeGmail\bnnb.apk"
Your answer
Follow this Question
Related Questions
Android Build error 1 Answer
Unity APK doesn't start - Logcat Debug 0 Answers
Unity stuck at "Creating APK package" 0 Answers
how to corrige the error in unity personal ? 1 Answer
I have the following error when trying to compile in Il2cpp... 2 Answers