How to Fix ads and play leaderboards ETC

READ THE UPDATE INSTEAD

So i’ve been trying to get ads in ue4 for a long time and it has not been working. this video does not help me at all. https://www…com/watch?v=NWjnPNIWX1s
Im not trying to get interstital ads im trying to get banner ads to work and they’re not working. I filled out all the information and I can only think of two things that i may have messedup/overlooked. Where do I put in my admob game ID because nowhere in documentation does it say anything about the admob app ID, and thats seems like an important part of it. And 2nd what exactly is that games app ID in the project settings-> android Im not sure what the format is supposed to look like because in the Developer console its like xxxxxxxxx, but I doubt myself cause What if it’s the admob game ID. I dont know so help would be obliged. thank you.

PS. Im using a blueprint project.


**"UPDATE" READ THIS INSTEAD.** This has been fixed and I hope this can help you as it is most likely why your stuff isn't working. Read the entire answer I posted :)

Is there anything I have to do on part that I may not have done? I’ve followed the UE4 documentation and it has not worked.

M4dM3ll0n,

The Games App ID is an ID obtained from the Play Developer Console, so you’ll see it within your Play Developer Console area once you’ve logged in to manage your app.

The Ad Mob Unit ID is an ID that you’ve obtained for Ad Mob to add into your game.

Make sure you’ve added your ‘Extra Permissions’ in, cause you’ll need to add com.android.vending.BILLING and set it up to show the ad banner in blueprints.

  • [Android Developer Page on Play Services][1]
  • [Using Ad Mob In-Game Ads on Android][2]

Thanks!

Android Mobile App Developer Tools – Android Developers
[2]: Using Ad Mob for In-Game Ads on Android with Unreal Engine | Unreal Engine 5.1 Documentation

I’ve done all that and I thinkI’ve found the problem after getting the idea to check the log I found this error
Unable to load module ‘AndroidAdvertising’ because the file ‘F:/NonSteamGames/new folder/Epic Games/4.12/Engine/Binaries/Win64/’ was not found

So How can I fix that cause I am almost 100% certain that this HAS to be the problem .Thank you!

I deleted this line of code I added from Admob Interstitial Unreal Engine 4 - summed up

[Advertising]

DefaultProviderName=AndroidAdvertising

Now the error I see is.

LogAdvertising:Warning: GetAdvertisingProvider called with a module name of None.
LogAdvertising:Warning: GetAdvertisingProvider called with a module name of None.

  • Have you tried deleting your projects Intermediate and Saved folder from the project folder?
  • Have you tried deleting your Win64 folder so it’ll refresh?

You may need to reverify your version of the editor in order to get the appropriate folders back once deleted.

Can you upload your new logs?

Thanks!

[link text][1]

104387-myaderror.txt (4.18 KB)

Everytime I press play on the editor it gives that and its still not finding win64. and not finding androidAdvertising. The folder is clearly there and i’v deleted it and nothing has worked yet.

Please make sure that you have your Android SDK set up correctly for 4.12.

![98373-androidsdk.jpg|604x316](

104368-options.png

  • After deleting the folders, did you re-verify your version of the engine?
  • Have you also tried opening each blueprint/asset/etc and recompiling/saving them within your project?
  • I would also suggest right-clicking in the menu of your Content Browser and fixing up re-directors in folder.
  • Have you tried to create a sample project where you implemented ads and received the same error or not?

I re-verifyed my engine twice, and I have create a sample project and the error is the same

“LogModuleManager:Warning: No filename provided for module AndroidAdvertising
LogModuleManager:Warning: ModuleManager: Unable to load module ‘AndroidAdvertising’ because the file ‘F:/NonSteamGames/new folder/Epic Games/4.12/Engine/Binaries/Win64/’ was not found.
LogAdvertising:Warning: Failed to find Advertising provider named AndroidAdvertising”

And my android SDK is set up correctly.
I’ve done the re-directors and the saving all/recompiling and nothing worked.

Will this picture help at all? maybe I’m missing a file or something?

As far as I can tell, your folder looks fine.

Have you tried opening your Build.cs file and adding the line for OnlineSubsystem module (“OnlineSubsystemGooglePlay”) and also including: PrivateDependencyModuleNames.Add(“AndroidAdvertising”);?

Hey M4dM3ll0n,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you!

I’ve tried it and it hasn’t worked either. The error is
“ogModuleManager:Warning: ModuleManager: Unable to load module ‘AndroidAdvertising’ because the file ‘F:/NonSteamGames/new folder/Epic Games/4.12/Engine/Binaries/Win64/’ was not found.
LogAdvertising:Warning: Failed to find Advertising provider named AndroidAdvertising.”
Why cant it find Win64? could that be the root of the problem?

PS. Also in the C++ files it cant acces the androidAdvertising.H

Thank you so much for all the help; I finally have figured it out.
For all the people having trouble this most likely will fix it.
In your (XXxxGAMExxXX).build.cs file in Unreal Engine Projects\MobileGame1 4.12\Source(XXxxGAMExxXX.
All you have to do is double click it, you need VS 2015 I use community, and then you coopy and paste this into the main code brackets

if (Target.Platform == UnrealTargetPlatform.Android)
    {
        PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystemGooglePlay", "AndroidAdvertising" });
    }

That basically says if you are in android then load android advertising module and use the play system. This should also fix Any problems with leaderboards and other things.

However in the editor I still get the error of cant find android advertising, probobly because I am not on android on the computer, and I couldn’t test it for ads for some reason either I didn’t do it right, or it wont work cause ADS ONLY SHOWED UP when I actually UPLOADED THE GAME. Now I can finally focus my time on other projects and I hope this solved anyones issues.

PS FOR THE DEVELOPERSS/STAFF Can you please fix this because it took me a long time to figure this out and If it were in the engine by default or in the documentation or when you click a button for play suppport it ads the code then I think your engine would be incredibly more well designed, cause this can just discourage creators from making mobile games on your engine. Thank You!

Please read the “PS” from my answer. Thank you so much for your help! :smiley:

You’re welcome, thank you for providing an elaborate resolution! :slight_smile:

I’ll make sure this is added to a Wiki and I’ll also send it forward for additional review.

Thanks!