Advanced setup & troubleshooting

Multidex

If your project already uses several libraries, it is possible that by adding Didomi it reaches the limit of 64K references. In this case, it is necessary to enable multidex in your project: https://developer.android.com/studio/build/multidex#groovyarrow-up-right

Example of error that can be caused by reaching the 64K limit:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':launcher:transformClassesWithDexBuilderForRelease'.
> com.android.build.api.transform.TransformException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException
android {    
    defaultConfig {
        multiDexEnabled = true
    }
}

Languages

Didomi SDK supports the following languages

Restricting the supported languages can reduce your application size.

android {
    defaultConfig {
        resourceConfigurations += ["en", "de", "fr", "es"]
    }
}

Note that the Hebrew (he) language code is rewritten as iw, Indonesian (id) as in, and Yiddish (yi) as ji (see https://developer.android.com/reference/java/util/Locale.html#legacy-language-codesarrow-up-right for more information).

For example: to add Hebrew language to the filtered list of language, you need to use iw.

circle-exclamation

Disable splitting by language

Get missing language through Install Manager

Zipline library

Didomi SDK uses the Zipline library (https://github.com/cashapp/ziplinearrow-up-right) to interpret local javascript code. Currently the Zipline dependency version is 1.18.0.

Since Didomi SDK version 2.36.0, it is possible to exclude this library from the dependencies,. In this case the Didomi SDK will use a WebView instance to evaluate javascript.

You can exclude Zipline in the build.gradle file, when adding the Didomi dependency:

At the moment, Didomi uses javascript for the following features:

  • Didomi Consent String

  • GPP

  • GCM privacy signals

circle-info

Didomi SDK does not interpret remote javascript. All the javascript code is embedded with the SDK release.

Drawbacks

circle-exclamation
circle-exclamation
circle-exclamation

Last updated