Skip to content

Troubleshooting

The following section describes many common issues you may find when integrating XMediator. Ensure you have followed the integration steps.

Problem #1

Android build is failing because it can't find some dependencies

  • Could not resolve com.google.android.gms:play-services-measurement-base:[x.x.x]\ [...]

Reason:

Unity is not able to resolve dependencies properly when multiple libraries depend on different versions of Google Play Services.

Solution:

If your project includes another library that depends on Google Play Services (such as Firebase), please update it to a more recent version.


Problem #2

I'm getting an error related to mainTemplate.gradle when building Android

  • mainTemplate.gradle file is using the old aaptOptions noCompress property definition which does not include types defined by unityStreamingAssets constant.

Reason:

Your project's Gradle template files are not compatible with the Gradle version included in the Unity version you are using. This can happen when updating the Unity version of your project.

Solution:

Delete your .gradle files (mainTemplate.gradle, launcherTemplate.gradle, ...) and their .backup* files. Then re-create them and rerun the Android Resolver to update their dependencies.


Problem #3

I'm not able to see ads, whether I set the test flag to true or false

Reason:

If you have already installed an adapter and you are still not receiving any ads, there might be a missing configuration.

Solution:

Ensure your app-ads.txt is properly set, reachable and updated with the adapters you have installed. If you have just created it, take into account that some networks may experience a delay in order to crawl and verify your app-ads.txt file.


Problem #4

I'm not able to see non-test ads even if I set the test flag to false and use a production placement Id

Reason:

Your device is being recognized as a test device.

Solution:

There are many things you could try to start receiving production ads:

  • Be sure you are building your app in release mode.

  • Run your app on a physical device, not an emulator/simulator.

  • Some networks provide a way to configure your device as a test device, so every time a request comes from these devices, a test ad is returned. Check that the device you are using is not whitelisted in the network's website.

  • In case you are testing GoogleAds integration in Android, try uploading your app to App Bundle Explorer or Internal App Sharing and download your app from there.


Problem #5

iOS Xcode compilation error

DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead

Reason:

Cocoapods version 1.12 or earlier, are not compatible with Xcode 15.

Solution:

Use cocoapods version 1.13 or higher.


Problem #6

iOS Xcode Dynamic libraries not loaded

Library not loaded: @rpath/AdViewSDK.framework/AdViewSDK

Reason:

Some network adapters do not support static linkage.

Solution:

Go to Assets > External Dependency Manager > iOS Resolver > Settings. Unchecking the Link Frameworks Statically option


Problem #7

iOS Xcode compilation error

Error: Internal build system error. BuildProgram exited with code 1. Unity.IL2CPP.Bee.BuildLogic.ToolchainNotFoundException: IL2CPP C++ code builder is unable to build C++ code. In order to build C++ code for Mac, you must have Xcode installed.

Reason:

Unity Editor version 2022.3.x bug.

Solution:

Update Unity Editor to 2022.3.10.f1 or higher.

Problem #8

I'm getting an error related to a dependency

[!] Unable to find a specification for XMediatorAdColony (= x.x.x.x)

Reason:

The dependency is no longer supported.

Solution:

Remove the dependency from your project

  • Go to folder Assets/XMediatorSettings/Editor and remove files XMediator<AdapterName>Dependencies. example: XMediatorAdColonyDependencies
  • In the case of Android, run resolve dependency again.