Skip to main content

Billing library collision

Unity: All versions | Appodeal SDK: 3.2.1-beta.1 or newer


The error the attribute meta-data#com.google.android.play.billingclient collides with another value occurs if you are using Unity IAP, as the dependency com.google.android.play.billingclient is also included in Yandex and MyTarget, which are part of the Appodeal SDK.

The error example from Unity:

The attribute meta-data#com.google.android.play.billingclient.version@value=5.2.1
in com.android.billingclient:billing:6.1.0 collides with another value

Solution:

To solve the error remove com.android.billingclient from those ad networks in your mainTemplate.gradle file as shown below:

implementation('com.applovin.mediation:mytarget-adapter:5.20.1.0') { 
exclude group: 'com.android.billingclient', module: 'billing'
}
implementation('com.appodeal.ads.sdk.networks:my_target:3.3.0.0') {
exclude group: 'com.android.billingclient', module: 'billing'
}
implementation('io.bidmachine:ads.networks.my_target:2.6.0.15') {
exclude group: 'com.android.billingclient', module: 'billing'
}
info

In case the solution above isn't compatible with your EDM settings, exclude the com.android.billingclient dependency as follows:

configurations {
implementation {
exclude group: 'com.android.billingclient', module: 'billing'
}
}