I am receiving an error while running an iOS build on device (Android doesn’t show the error). The error is “A type load exception has occurred.” and it looks to stem from UnityEngine.Monetization.Analytics:InitializeStandardEvents(). I created a test project that has 1 line of code. It happens with Release or Debug set in build settings, and also with FastButNoExceptions or SlowAndSafe. Any help would be appreciated as I have NO CLUE where to go from here! Thanks!
Code:
Monetization.Initialize(“”, false); // is my actual game ID, but I didn’t want to share it in forums
Using latest Monetization and IAP:
Unity Monetization 3.0.3
Unity IAP 1.22.0
Unity 2017.4.20f1 LTS
Console:
Tue 23 04:05:14.958 RemoteConsole YourApp : A type load exception has occurred.
Tue 23 04:05:14.958 RemoteConsole YourApp : UnityEngine.Monetization.Analytics:InitializeStandardEvents()
Tue 23 04:05:14.958 RemoteConsole YourApp : UnityEngine.Monetization.Analytics:SetAnalyticsEventExtra(String, Object)
Tue 23 04:05:14.958 RemoteConsole YourApp : UnityEngine.Monetization.Analytics:SetAnalyticsEventExtra(String)
Tue 23 04:05:14.958 RemoteConsole YourApp :
Tue 23 04:05:14.958 RemoteConsole YourApp : (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Tue 23 04:05:14.958 RemoteConsole YourApp :
Tue 23 04:05:14.979 RemoteConsole YourApp : 2019-04-23 04:05:15.325 quarterstemp[3634:1350634] A type load exception has occurred.
Tue 23 04:05:14.979 RemoteConsole YourApp : UnityEngine.Monetization.Analytics:InitializeStandardEvents()
Tue 23 04:05:14.979 RemoteConsole YourApp : UnityEngine.Monetization.Analytics:SetAnalyticsEventExtra(String, Object)
Tue 23 04:05:14.979 RemoteConsole YourApp : UnityEngine.Monetization.Analytics:SetAnalyticsEventExtra(String)
Tue 23 04:05:14.979 RemoteConsole YourApp :
Tue 23 04:05:14.979 RemoteConsole YourApp : (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)