Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Bug : Not support for IL2CPP #150

Open
theghostbh opened this issue Nov 29, 2022 · 1 comment
Open

Bug : Not support for IL2CPP #150

theghostbh opened this issue Nov 29, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@theghostbh
Copy link

theghostbh commented Nov 29, 2022

BuildFailedException: Incremental Player build failed!
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <4ce403b7cdf744109283ae55cdc24285>:0)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <4ce403b7cdf744109283ae55cdc24285>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <6ba6f58d0f264bb59a4f0a6df92c605b>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <4ce403b7cdf744109283ae55cdc24285>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Build completed with a result of 'Failed' in 304 seconds (303605 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <4ce403b7cdf744109283ae55cdc24285>:0 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <4ce403b7cdf744109283ae55cdc24285>:0 
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


Building Library\Bee\artifacts\Android\ManagedStripped failed with output:
C:\Program Files\Unity\Hub\Editor\2022.1.23f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe --search-directory=D:/Game Project/Still/Squad of Heroes/Library/Bee/PlayerScriptAssemblies --search-directory=C:/Program Files/Unity/Hub/Editor/2022.1.23f1/Editor/Data/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Managed --search-directory=D:/Game Project/Still/Squad of Heroes/Assets/GoogleMobileAds --search-directory=D:/Game Project/Still/Squad of Heroes/Library/PackageCache/[email protected]/Runtime/VisualScripting.Flow/Dependencies/NCalc --search-directory=D:/Game Project/Still/Squad of Heroes/Library/PackageCache/[email protected]/Runtime/AOT --search-directory=C:/Program Files/Unity/Hub/Editor/2022.1.23f1/Editor/Data/MonoBleedingEdge/lib/mono/unityaot-linux --search-directory=C:/Program Files/Unity/Hub/Editor/2022.1.23f1/Editor/Data/MonoBleedingEdge/lib/mono/unityaot-linux/Facades --out=Library/Bee/artifacts/Android/ManagedStripped --include-link-xml=D:/Game Project/Still/Squad of Heroes/Temp/StagingArea/Data/Managed\MethodsToPreserve.xml --include-link-xml=D:/Game Project/Still/Squad of Heroes/Temp/StagingArea/Data/Managed\TypesInScenes.xml --include-link-xml=D:/Game Project/Still/Squad of Heroes/Temp/StagingArea/Data/Managed\SerializedTypes.xml --include-link-xml=D:\Game Project\Still\Squad of Heroes\Assets\GoogleMobileAds\link.xml --include-link-xml=C:/Program Files/Unity/Hub/Editor/2022.1.23f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/AndroidNativeLink.xml --include-directory=D:/Game Project/Still/Squad of Heroes/Library/Bee/PlayerScriptAssemblies --include-directory=C:/Program Files/Unity/Hub/Editor/2022.1.23f1/Editor/Data/PlaybackEngines/AndroidPlayer/Variations/il2cpp/Managed --include-directory=D:/Game Project/Still/Squad of Heroes/Assets/GoogleMobileAds --include-directory=D:/Game Project/Still/Squad of Heroes/Library/PackageCache/[email protected]/Runtime/VisualScripting.Flow/Dependencies/NCalc --include-directory=D:/Game Project/Still/Squad of Heroes/Library/PackageCache/[email protected]/Runtime/AOT --include-directory=C:/Program Files/Unity/Hub/Editor/2022.1.23f1/Editor/Data/MonoBleedingEdge/lib/mono/unityaot-linux --include-directory=C:/Program Files/Unity/Hub/Editor/2022.1.23f1/Editor/Data/MonoBleedingEdge/lib/mono/unityaot-linux/Facades --dotnetprofile=unityaot-linux --dotnetruntime=Il2Cpp --platform=Android --use-editor-options --editor-settings-flag=None,Development --enable-engine-module-stripping --engine-modules-asset-file=C:/Program Files/Unity/Hub/Editor/2022.1.23f1/Editor/Data/PlaybackEngines/AndroidPlayer/modules.asset --editor-data-file=D:/Game Project/Still/Squad of Heroes/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --include-unity-root-assembly=D:/Game Project/Still/Squad of Heroes/Library/Bee/PlayerScriptAssemblies/Assembly-CSharp.dll --include-unity-root-assembly=D:/Game Project/Still/Squad of Heroes/Library/Bee/PlayerScriptAssemblies/UnityEngine.UI.dll --print-command-line
Fatal error in Unity CIL Linker
Mono.Linker.LinkerFatalErrorException: ILLink: error IL1005: GoogleMobileAds.Api.MobileAds.GetClientFactory(): Error processing method 'GoogleMobileAds.Api.MobileAds.GetClientFactory()' in assembly 'GoogleMobileAds.dll'
 ---> System.InvalidOperationException: No action for the assembly GoogleMobileAds.Unity, Version=7.3.1.0, Culture=neutral, PublicKeyToken=null defined
   at Mono.Linker.AnnotationStore.GetAction(AssemblyDefinition assembly)
   at Mono.Linker.Steps.MarkStep.MarkCustomAttributes(ICustomAttributeProvider provider, DependencyInfo& reason, IMemberDefinition sourceLocationMember)
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
   at Mono.Linker.Steps.MarkStep.MarkTypeVisibleToReflection(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
   at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.<>c__DisplayClass20_4.<HandleCall>b__7()
   at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.HandleCall(MethodBody callingMethodBody, MethodReference calledMethod, Instruction operation, ValueNodeList methodParams, ValueNode& methodReturnValue)
   at Mono.Linker.Dataflow.MethodBodyScanner.HandleCall(MethodBody callingMethodBody, Instruction operation, Stack`1 currentStack)
   at Mono.Linker.Dataflow.MethodBodyScanner.Scan(MethodBody methodBody)
   at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.ScanAndProcessReturnValue(MethodBody methodBody)
   at Unity.Linker.Steps.UnityMarkStep.MarkReflectionLikeDependencies(MethodBody body, Boolean requiresReflectionMethodBodyScanner)
   at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
   at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody(MethodBody body)
   at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
   at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   --- End of inner exception stack trace ---
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
   at Mono.Linker.Steps.MarkStep.Process()
   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
   at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
   at Unity.Linker.UnityDriver.RunDriver()
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
@theghostbh theghostbh added the bug Something isn't working label Nov 29, 2022
@applejag
Copy link
Owner

Hello @theghostbh, this seems to be an issue with the GoogleMobileAds DLL, and not with Newtonsoft.Json, given the error message from your stack trace: Mono.Linker.LinkerFatalErrorException: ILLink: error IL1005: GoogleMobileAds.Api.MobileAds.GetClientFactory(): Error processing method 'GoogleMobileAds.Api.MobileAds.GetClientFactory()' in assembly 'GoogleMobileAds.dll'

This could be because of the code stripping, so could you try adding a file named link.xml inside your Assets directory with the following content:

<linker>
    <assembly fullname="GoogleMobileAds" />
    <assembly fullname="GoogleMobileAds.dll" />
</linker>

You can find more help here: https://github.com/jilleJr/Newtonsoft.Json-for-Unity/wiki/Fix-AOT-using-link.xml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants