- Home /
When I build my game's update, admob ads don't appear
Hi. I'm using Unity 2018.4.15.f1 version. I published my app's first verison on Google Play and everything is ok. However, when I build it's update, Unity is giving the error message which is below:
NullReferenceException: Object reference not set to an instance of an object GooglePlayServices.UnityCompat.VersionFromAndroidSDKVersionsEnum (System.String enumName, System.String fallbackPrefKey, System.Int32 fallbackValue) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:58) GooglePlayServices.UnityCompat.GetAndroidTargetSDKVersion () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/UnityCompat.cs:116) GooglePlayServices.PlayServicesResolver.CanEnableJetifierOrPromptUser (System.String titlePrefix) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:2314) GooglePlayServices.PlayServicesResolver.ResolveUnsafe (System.Action`1[T] resolutionComplete, System.Boolean forceResolution, System.Boolean isAutoResolveJob, System.Boolean closeWindowOnCompletion) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1635) GooglePlayServices.PlayServicesResolver+c_AnonStorey1E.<>m3F () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1604) GooglePlayServices.PlayServicesResolver.ExecuteNextResolveJob () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1461) GooglePlayServices.PlayServicesResolver.ScheduleResolve (System.Boolean forceResolution, System.Boolean closeWindowOnCompletion, System.Action`1[T] resolutionCompleteWithResult, System.Boolean isAutoResolveJob) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1617) GooglePlayServices.PlayServicesResolver.ResolveSync (System.Boolean forceResolution, System.Boolean closeWindowOnCompletion) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1514) GooglePlayServices.PlayServicesResolver.OnPostProcessScene () (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:1087) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.Build.BuildPipelineInterfaces+AttributeCallbackWrapper.OnProcessScene (UnityEngine.SceneManagement.Scene scene, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:163) UnityEditor.Build.BuildPipelineInterfaces+cAnonStorey1.<>m_1 (UnityEditor.Build.IProcessSceneWithReport spp) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:387) UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:356) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
When I test apk file of updated version on Emulator, I can run the app but admob ads don't appear. I tried build first version of game again and it works fine. Then I entered my keystore and I changed only version and bundle version code of my app but when I built it, same error appeared.
What should I do to handle this problem. I'm working on it for days but I couldn't solve it.