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.
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
Find where these libraries are implemented and at the end put:
constraints.implementation ‘androidx.fragment:fragment:1.3.6’
in the dependency{}
Sync build
Check external Libraries in the project section
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
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:
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 (com.google.android.gms:play-services-ads-lite) and (com.google.android.gms:play-services-ads) issues do the following:
Go to C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Advertising\Android\AndroidAdvertising
Right click ‘AndroidAdvertising_APL’ file, select ‘properties’ and untick ‘read-only’
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.
Hi! i did the same thing as you but then the project wouldn’t package, i tried to restore what i changed by using the stuff from ue5.4 (the project is on 5.3) but still can’t export the game
Another thing to note, if you need to revert/undo any changes to Unreals base code files, simply click on the drop down arrow linked and hit ‘Verify’. This will undo all the changes you made IF your engine is loaded from the epic launcher.
based on my experience admob doesn’t work properly in UE5.4. If you are packaging it to “shipping” you need to fill out the “Signing for Distribution” in the Android Platform and make sure that the check box “For Distribution” is enabled in Project Packaging
when i try to include android advertising then packageing will always failed in C++,if i try to include admob support in only blueprint then then it always give me error UE5.4/5.3 same