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 and 3 are identical
2&3) 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*

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 Settings → Developer 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 Edit/Project Settings/Player, 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 apk 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.

  1. 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()

  2. 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

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: File > Build Settings > Player Settings > (Android icon) > Other Settings > Package 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

Somone 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.

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

Same is the case with my apk. I don’t know how to proceed further. Any help would be highly appreciated.

I am also facing this android sdk issue on my smartphone with this app. I don’t know how to proceed. Looks like it is a very common issue.