Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Split application binary AAB rejected in Google Play because of outdated play services ads

Discussion in 'Android' started by luvjungle, Sep 18, 2023.

  1. luvjungle

    luvjungle

    Joined:
    Dec 18, 2017
    Posts:
    58
    When I try to submit my aab with split application binary enabled, I get an error that I have com.google.android.gms: play-services-ads (and ads-lite) version 16 in project, which is outdated.
    If I don't use split application binary, I can submit just fine.
    I suppose that it is transitive dependencies from gms play services core and asset delivery, which are being added during build to implement aab split application binary.
    Is there a way to exclude ads dependency? Maybe with command in gradle template, or any other way?
    I use unity 2021.3.10.
    Thanks.
     
    Last edited: Sep 19, 2023
  2. luvjungle

    luvjungle

    Joined:
    Dec 18, 2017
    Posts:
    58
    Those instructions in mainTemplate.gradle allows to upload to google play just fine and everything is working too.
    just don't forget to remove it when you add real google play ads to your game.

    Code (CSharp):
    1. configurations.implementation {
    2.    exclude group: 'com.google.android.gms', module:'play-services-ads-lite'
    3.    exclude group: 'com.google.android.gms', module:'play-services-ads'
    4. }