- Home /
HELP Build error for Android Unity 2018.2.21f1 in Google Services
When a 64-bit build project without Google Services, everything works fine. And when I connect the Google Services plugin, it gives such an error, please help
NullReferenceException: Object reference not set to an instance of an object UnityEditor.Android.AndroidSDKTools.RunCommand (UnityEditor.Android.AndroidJavaTools javaTools, System.String[] sdkToolCommand, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.ListTargetPlatforms (UnityEditor.Android.AndroidJavaTools javaTools) UnityEditor.Android.AndroidSDKTools.GetTopAndroidPlatformAvailable (UnityEditor.Android.AndroidJavaTools javaTools) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) GooglePlayServices.UnityCompat.FindNewestInstalledAndroidSDKVersion () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:279) GooglePlayServices.UnityCompat.GetAndroidTargetSDKVersion () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:120) GooglePlayServices.PlayServicesResolver.CanEnableJetifierOrPromptUser () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:2213) GooglePlayServices.PlayServicesResolver.ResolveUnsafe (System.Action`1 resolutionComplete, Boolean forceResolution, Boolean isAutoResolveJob) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1607) GooglePlayServices.PlayServicesResolver+c_AnonStorey15.<>m25 () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1581) GooglePlayServices.PlayServicesResolver.ExecuteNextResolveJob () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1455) GooglePlayServices.PlayServicesResolver.ScheduleResolve (Boolean forceResolution, System.Action`1 resolutionCompleteWithResult, Boolean isAutoResolveJob) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1592) GooglePlayServices.PlayServicesResolver.ResolveSync (Boolean forceResolution) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1506) GooglePlayServices.PlayServicesResolver.OnPostProcessScene () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1083) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnProcessScene (Scene scene, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:163) UnityEditor.Build.BuildPipelineInterfaces+cAnonStorey1.<>m_1 (IProcessSceneWithReport spp) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:387) UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[IProcessScene,IProcessSceneWithReport] (System.Collections.Generic.List`1 oneInterfaces, System.Action`1 invocationOne, System.Collections.Generic.List`1 twoInterfaces, System.Action`1 invocationTwo, Boolean exitOnFailure) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:356) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)