Skip to content

Google Play warning: androidx.fragment:fragment has reported fragment:1.1.0 as outdated in builds using Google Mobile Ads Unity Plugin 11.2.0 #4224

Description

@eduardocoelho

[REQUIRED] Step 1: Describe your environment

  • Unity version: 6000.2.11f1

  • Google Mobile Ads Unity plugin version: 11.2.0

  • Plugin installation method: .unitypackage import

  • Platform: Android

  • Platform OS version: Android

  • Any specific devices issue occurs on: Not device-specific. This is a Google Play Console SDK warning after uploading an Android App Bundle.

  • Mediation ad networks used, and their versions: None / not relevant to this issue.

[REQUIRED] Step 2: Describe the problem

Google Play Console is showing the following SDK warning after uploading my Android build:


An SDK version you are using is outdated

androidx.fragment:fragment has reported fragment:1.1.0 as outdated. Consider updating to a newer SDK version.

Affected app bundles and APKs:

- version: 98 (1.7.4), release: 1.7.4 (98)

- version: 98 (1.7.4), release: 1.7.4 (98)

If you have questions about this SDK, contact the SDK provider.

After updating to Google Mobile Ads Unity Plugin 11.2.0, I confirmed that the Google Mobile Ads Android SDK dependency was updated correctly:


com.google.android.gms:play-services-ads:25.3.0

com.google.android.gms:play-services-ads-api:25.3.0

com.google.android.ump:user-messaging-platform:4.0.0

However, the final Gradle dependency tree still resolves AndroidX Fragment to:


androidx.fragment:fragment:1.1.0

Google Play now reports this as outdated.

From the dependency tree, the fragment:1.1.0 dependency appears to be pulled indirectly through the Google Mobile Ads Unity plugin dependency on androidx.constraintlayout:constraintlayout:2.1.4.

Steps to reproduce:

  1. Use Unity 6000.2.11f1.

  2. Import Google Mobile Ads Unity Plugin 11.2.0.

  3. Build Android APK/AAB directly from Unity using IL2CPP.

  4. Upload the build to Google Play Console.

  5. Google Play Console reports that androidx.fragment:fragment:1.1.0 is outdated.

  6. Run Gradle dependency insight on the generated Unity Gradle project:

cd /.../Library/Bee/Android/Prj/IL2CPP/Gradle

java -classpath "/Applications/Unity/Hub/Editor/6000.2.11f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-8.13.jar" \

  org.gradle.launcher.GradleMain \

  :unityLibrary:dependencyInsight \

  --dependency androidx.fragment:fragment \

  --configuration releaseRuntimeClasspath

Relevant output:


androidx.fragment:fragment:1.1.0

   Selection reasons:

      - By conflict resolution: between versions 1.1.0 and 1.0.0

androidx.fragment:fragment:1.1.0

+--- androidx.appcompat:appcompat:1.2.0

|    \--- androidx.constraintlayout:constraintlayout:2.1.4

|         \--- releaseRuntimeClasspath

\--- com.google.android.gms:play-services-basement:18.9.0

     +--- com.google.android.gms:play-services-ads:25.3.0

     |    \--- releaseRuntimeClasspath

     +--- com.google.android.gms:play-services-ads-api:25.3.0

     |    \--- com.google.android.gms:play-services-ads:25.3.0

     +--- com.google.android.ump:user-messaging-platform:4.0.0

     |    +--- releaseRuntimeClasspath

     |    \--- com.google.android.gms:play-services-ads-api:25.3.0

androidx.fragment:fragment:1.0.0 -> 1.1.0

\--- com.google.android.gms:play-services-base:18.5.0

I also checked where constraintlayout:2.1.4 is declared:

grep -R "constraintlayout" Assets Packages ProjectSettings 2>/dev/null

Output:


Assets/Plugins/Android/mainTemplate.gradle:    implementation 'androidx.constraintlayout:constraintlayout:2.1.4' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:12

Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:    <androidPackage spec="androidx.constraintlayout:constraintlayout:2.1.4">

ProjectSettings/AndroidResolverDependencies.xml:    <package>androidx.constraintlayout:constraintlayout:2.1.4</package>

So the dependency path appears to be:


Google Mobile Ads Unity Plugin 11.2.0

└── Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml

    └── androidx.constraintlayout:constraintlayout:2.1.4

        └── androidx.appcompat:appcompat:1.2.0

            └── androidx.fragment:fragment:1.1.0

I also verified that the Google Mobile Ads Android SDK itself was updated correctly with this command:

cd /.../Library/Bee/Android/Prj/IL2CPP/Gradle

java -classpath "/Applications/Unity/Hub/Editor/6000.2.11f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-8.13.jar" \

  org.gradle.launcher.GradleMain \

  :unityLibrary:dependencyInsight \

  --dependency com.google.android.gms:play-services-ads \

  --configuration releaseRuntimeClasspath

Relevant output:


com.google.android.gms:play-services-ads:25.3.0

\--- releaseRuntimeClasspath

com.google.android.gms:play-services-ads-api:25.3.0

\--- com.google.android.gms:play-services-ads:25.3.0

     \--- releaseRuntimeClasspath

Question:

Is this expected behavior for Google Mobile Ads Unity Plugin 11.2.0?

Should the plugin explicitly declare a newer androidx.fragment:fragment dependency, or update its AndroidX dependencies so Google Play no longer reports androidx.fragment:fragment:1.1.0 as outdated?

For example, should the plugin include a newer Fragment dependency such as:

<androidPackage spec="androidx.fragment:fragment:1.8.9">

  <repositories>

    <repository>https://maven.google.com/</repository>

  </repositories>

</androidPackage>

Or is the recommended workaround for Unity developers to add their own EDM4U dependency override?

Expected behavior:

Using the latest Google Mobile Ads Unity Plugin should not result in Google Play Console reporting this warning:


androidx.fragment:fragment has reported fragment:1.1.0 as outdated.

Actual behavior:

Google Mobile Ads Unity Plugin 11.2.0 correctly updates the AdMob SDK to play-services-ads:25.3.0 and UMP to user-messaging-platform:4.0.0, but the final app still resolves:


androidx.fragment:fragment:1.1.0

which triggers the Google Play Console warning.

Relevant Code:

There is no app code required to reproduce this. The issue appears to come from the Android dependency resolution.

Relevant dependency declaration:

<!-- Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml -->

<androidPackage spec="androidx.constraintlayout:constraintlayout:2.1.4">

This is resolved by EDM4U into:

implementation 'androidx.constraintlayout:constraintlayout:2.1.4' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:12

which then results in:


androidx.constraintlayout:constraintlayout:2.1.4

└── androidx.appcompat:appcompat:1.2.0

    └── androidx.fragment:fragment:1.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions