# Troubleshooting

### Newtonsoft dll error

In some Unity versions (including several Unity 2020 and 2021 versions), you may encounter this error:

`Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included or the current platform. Only one assembly with the same name is allowed per platform.`

In this case, use the `Didomi-noDll.unitypackage` release file instead of `Didomi.unitypackage`, or manually remove the file `Assets/Plugins/Didomi/IOS/Newtonsoft.Json.dll` from the regular package after importing it.

### Gradle 6.1.1

This is the default gradle version on Unity version 2021.3 and below.

With this version, you may encounter an error at build time:

```log
> Cannot choose between the following variants of com.google.guava:guava:32.1.3-android:
    - androidRuntimeElements
    - jreRuntimeElements
```

If changing the gradle version is not possible, it is possible to fix this issue:

* In Player settings, in Android section, activate `Custom Main Gradle Template` and `Custom Launcher Gradle Template`

<figure><img src="/files/wr0rhnGjcMhedSwdlOYw" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/yLhJyQrNDIKA1wZs7Zha" alt=""><figcaption></figcaption></figure>

* Modify `Assets/Plugins/Android/mainTemplate.gradle` and `Assets/Plugins/Android/launcherTemplate.gradle` by adding

```gradle
configurations.all {
    resolutionStrategy {
        force 'com.google.guava:guava:32.0.1-android'
    }
}
```

before the `dependencies` block.

{% code title="mainTemplate.gradle" %}

```gradle
configurations.all {
    resolutionStrategy {
        force 'com.google.guava:guava:32.0.1-android'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
**DEPS**}
```

{% endcode %}

{% code title="launcherTemplate.gradle" %}

```gradle
configurations.all {
    resolutionStrategy {
        force 'com.google.guava:guava:32.0.1-android'
    }
}

dependencies {
    implementation project(':unityLibrary')
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.didomi.io/cmp/mobile-sdk/unity-sdk/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
