CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the editor

Unable to build and run. Using Unity 5.5.1f1 Personal (64bit) on a MacBook pro and connected to a rooted Samsung S4 active. Some builds will work but recently unable to run and build 2 projects. Console gives me these failures.

  1. UnityException: Bundle Identifier has not been set up correctly Please set the Bunbel Identifier in the Player Settings. The value must follow the convention ‘com.YourCompanyName.YourProductName and can contain alphanumeric characters and underscore.

  2. 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. /user/developmentlab/Library/Android/sdk/platforn-tools/adb -s"8f4e23a5"install-r*/user/developmentlab/Helicopter 1/Helicopter 1.apk*

  3. Is the same as 2.

Any help would be grateful.

I Also found that the app had previously been installed but needed to be uninstalled first.

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 SettingsDeveloper Options, check Install via USB ☑, and uncheck Verify apps over USB ☐, then it worked.

Maybe one of these settings is optional.

For anyone stumbling across this, this is wrong. Your package name should be along the lines of: com.YourCompanyName.YourAppName Dont copy that, but fill in the YourCompanyName with your actual name or some fictional name whatever, YourAppName should be the name of your app, but it doesnt have to match exactly! It could be rainbowTiger if you wanted to.

Go to EditProject SettingsPlayer, select android and in publishing settings change com.yourCompany... to com. + whatever you want after that.

The latter error is rather simple, make sure USB debugging is active, and if it does not work, just transfer the APG file to your device.

Thank you. Will try that right now. com.companyName.project are set. Android USB debugging is on.

Trying to build and save to desktop but nothing happens. Still get the

UnityException: Bundle Identifier has not been set up correctly
Please set the Bundel Identifier in the Player Settings. The value must follow the convention ‘com.YourCompanyName.YourProductName and can contain alphanumeric characters and underscore.

Now I am receiving 2 others.

Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> UnityEngine.MissingReferenceException: The object of type 'AudioSource' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
  at (wrapper managed-to-native) UnityEngine.AudioSource:Stop ()
  at Vuforia.DefaultTrackableEventHandler.OnTrackableStateChanged (Status previousStatus, Status newStatus) [0x00051] in /Users/bobadrion/Helicopter 1/Assets/Vuforia/Scripts/DefaultTrackableEventHandler.cs:67 
  at Vuforia.TrackableBehaviour.OnTrackerUpdate (Status newStatus) [0x00000] in :0 
  at Vuforia.DataSetTrackableBehaviour.OnTrackerUpdate (Status newStatus) [0x00000] in :0 
  at Vuforia.StateManagerImpl.SetTrackableBehavioursForTrackableToNotFound (Trackable trackable) [0x00000] in :0 
  at Vuforia.ObjectTrackerImpl.Stop () [0x00000] in :0 
  at Vuforia.VuforiaARController.StopVuforia () [0x00000] in :0 
  at Vuforia.VuforiaARController.OnDisable () [0x00000] in :0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000d0] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000eb] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115 
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000b9] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Delegate.cs:443 
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00018] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/MulticastDelegate.cs:71 
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Delegate.cs:415 
  at Vuforia.DelegateHelper.InvokeDelegate (System.Delegate action, System.Object[] args) [0x00000] in :0 
UnityEngine.Debug:LogError(Object)
Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action)
Vuforia.VuforiaAbstractBehaviour:OnDisable()
Could not deinitialize the tracker.
UnityEngine.Debug:LogError(Object)
Vuforia.TrackerManagerImpl:DeinitTracker()
Vuforia.VuforiaARController:OnDestroy()
System.Delegate:DynamicInvoke(Object[])
Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action)
Vuforia.VuforiaAbstractBehaviour:OnDestroy()

I have managed how to fix this issue by removing APK from device and then rebuild project

I had this problem, when I had app already installed on phone, maybe some diferent version. Deleting app from phone did the trick.

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.

common dissolver ?

I used to always put the phone in the same USB port when I changed the cable to a different port I got this error, the way I found the problem was to build the apk file and then try to copy that to the phone using the file manager, the copy failed so I changed the cable to the same old port, tried again and build and run just worked again.

Changing the Package Name worked for me.
In Unity: FileBuild SettingsPlayer Settings(Android icon)Other SettingsPackage Name.

I think this happens because many examples of AR apps are based on the same base app / examples provided by Google. So they all start with that same app, and only rename the display name, but not the package name. Then when you want to install, it finds that the package name is already taken, so it doesn’t install. Or you have an older version installed of the same app, so then uninstalling helped some people.


com.google.ar.core.examples.unity.helloar is what was set as Package Name in my project, and now you can see that anyone who built an example app based off this will have this very same package name unless they changed it, which they often forget I’d wager.

Hopefully this helps someone,

I got mine working by downloading and installing android file transfer on my mac. Once I opened it and it requested access from my mobile (galaxy note 8) I was able to build to my phone. Haven’t opened or used the android file transfer since.

You may also receive this error when there is not enough disk space on target device

Someone help me 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"

for me ,
i just uninstalled the app
restarted.

If you using Xiaomi phone, here is the solution that works for me:
Enable all of these option in the Developer Options from your phone Setting.

  • Developer Mode
  • USB Debugging
  • Install via USB
  • USB debugging (Security Settings)

The USB debugging (Security Settings) option will give you several warning. Make sure you are eventually enable it.
If you are nervous, just disable after you done with your test.