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?
“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.
rectvv
3
change the split application binary at player setting
DCrosby
4
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.
Jovaan
5
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.
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”
I had this issue a moment ago when I tried to Build & Run on my Android phone. I have Android SDK and all other SDKs up to date. Eventually, the problem was in my phone Xiaomi. I had to go to Settings → Developer Options, check “Install via USB”, and uncheck “Verify apps over USB”, then it worked. Maybe one of these settings is optional.