Update Google SDKs

I packaged my Android game, uploaded it to Play Console and enabled admob. But it informed me that the SDK is out of date. I’ve been looking for a solution to this problem for days. Normally, version 18.1.0 came by default and I was able to upgrade it to 19.8.0 at most. But I need to upgrade to 20.x.x-22.x.x. In aar-imports.txt, if I choose high version numbers, I get errors during packaging. The reason for the errors is that new GMA SDKs come with some code changes. Please help me.

Sorry for using translation.

The Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads-lite) developer added the following note to the 19.8.0 SDK version:
This version is scheduled to be retired on June 30, 2023. See रुकना और सूर्यास्त  |  Android  |  Google for Developers for more information.

Adding 1:

The developer of the androidx.fragment:fragment (androidx.fragment:fragment) SDK reported that version 1.0.0 is outdated. We recommend upgrading to one of the following SDK versions before releasing a new version: 1.1.0+.

Adding 2:
Also add com.google.android.gms.permission.AD_ID to the Extra Tags for node section. If I add it the packaging fails.

Your advertising ID declaration in Play Console states that your app uses advertising ID. The manifest file in one of your active builds does not contain the com.google.android.gms.permission.AD_ID permission.

really not clear. and there are non english text there and vague explaining.

In my article, I translated a part into English, “Quoted part”. In Google Play, I get a warning that the Google Mobile Ads (GMS) SDK is outdated.

Same issue here with submitting an app to Google Play Store with Google AdMob. Bookmarking this post and hopefully they push an update for it.

Hi,
What is your UE version?

I’ve found simple workaround for androidx.fragment:fragment:1.0.0.

  1. Set up project in Android Studio in the location ‘yourproject’\Intermediate\Android\gradle
  2. Open File->Project Structure…
  3. Select Dependencies->AllModuls->androidx.fragment:fragment:1.0.0
  4. Check dependencies in TargetModules/Artifacts
  5. Find all places where libraries, which contains androidx.fragment:fragment:1.0.0, are implemented. (In my project these are two files: gradle\app\arr-imports.gradle and gradle\permission_library\build.gradle
  6. Find where these libraries are implemented and at the end put:
    constraints.implementation ‘androidx.fragment:fragment:1.3.6’
    in the dependency{}
  7. Sync build
  8. Check external Libraries in the project section
  9. If there are two versions of androidx.fragment:fragment (1.0.0 and 1.3.6), go back to 2. and check which library contains version 1.0.0
  10. Build AAB using Android Studio. (by default only release version contains Key Store)

It’s not the best solution, because you have to edit files for every build once again. I’ve tried to implement solution using UPL, but I failed.

My file: gradle\app\arr-imports.gradle with implemented my solution:

repositories {
	maven { url uri('D:/UnrealEngine/UE_5.3/Engine/Source/ThirdParty/Android/extras/google/m2repository') }
	maven { url uri('D:/UnrealEngine/UE_5.3/Engine/Source/ThirdParty/Android/extras/android/m2repository') }
}
dependencies {
	implementation 'com.google.android.gms:play-services-auth:18.1.0'
	implementation 'com.google.android.gms:play-services-nearby:18.1.0'
	implementation 'com.google.android.gms:play-services-games:18.0.1'
	implementation 'com.google.android.gms:play-services-plus:17.0.0'
	constraints.implementation 'androidx.fragment:fragment:1.3.6'
}

1 Like

Hi, I’ve managed to resolve the issues in 5.3 but it does require editing unreal’s source code so please beware. BACK UP before attempting this. This solution also works for those who use banner ads. Additional steps are required for those who use interstitial or other types of ads.

For the (androidx.fragment:fragment) error, answer is provided in this post: Google console telling me androidx.fragment:fragment:1.0.0 is outdated

For the (com.google.android.gms:play-services-ads-lite) and (com.google.android.gms:play-services-ads) issues do the following:

  1. Go to C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Advertising\Android\AndroidAdvertising

  2. Right click ‘AndroidAdvertising_APL’ file, select ‘properties’ and untick ‘read-only’

  3. Open ‘AndroidAdvertising_APL’ file using notepad and edit the following:

  • Change dependencies to the following:
    implementation(‘com.google.android.gms:play-services-ads:22.6.0’)
    implementation(‘com.google.android.gms:play-services-ads-lite:22.6.0’)

  • Remove ALL instances/mentions of interstitial ads. Alternatively, you can update them. I haven’t tried updating since my project doesn’t use them.

  • Remove ALL ‘@override

  1. Save and build

Hope this helps.

2 Likes

Thank you for sharing this information. It solved some of my issues or warning in the play console.

1 Like

Who search realy good solution go to the next post:

1 Like