Mobile Ads - Simple way to integrate ads in your app

Hello, We want to implement vungle ads into our games but the game app crash when it started. We already delete Assets/Plugins/Android/androidx.core.core-1.0.0 from vungle unity package. We are using unity 2020.3.20. These are the errors that occur when we logcat the app:

2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime FATAL EXCEPTION: vng_background-th-1
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime Process: com.mncgames.play.kikorun, PID: 23494
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/Interceptor;
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at com.vungle.warren.Plugin.addWrapperInfo(Plugin.java:16)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at com.vungle.androidplugin.VunglePlugin$1.run(VunglePlugin.java:94)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at com.vungle.androidplugin.Utility$1.run(Utility.java:154)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at android.os.Handler.handleCallback(Handler.java:873)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at android.os.Handler.dispatchMessage(Handler.java:99)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at android.os.Looper.loop(Looper.java:214)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at android.app.ActivityThread.main(ActivityThread.java:7050)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at java.lang.reflect.Method.invoke(Native Method)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.Interceptor" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.mncgames.play.kikorun-vyq_Idasv6jdshvj_BYk7w==/base.apk"],nativeLibraryDirectories=[/data/app/com.mncgames.play.kikorun-vyq_Idasv6jdshvj_BYk7w==/lib/arm64, /data/app/com.mncgames.play.kikorun-vyq_Idasv6jdshvj_BYk7w==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
2022/04/18 10:33:49.823 23494 23840 Error AndroidRuntime   ... 10 more

Could you tell us how to solve these errors? Thanks

Hello,

Please check this complete project with all advertisers already integrated and compare it with yours:
https://github.com/gleygames/MobileAds-Unity2020LTS-AllAds

You should see there what libraries should be kept from Vungle in order to work.

Hello,

Thanks for the updates. When we clone the project, we encounter some errors when building the project. 8077814--1044308--photo6285237317308362497.jpg

Could you tell us what version the gradle should be and how to solve these errors? Thanks

Hello,
As it says on your errors you need to accept licenses on your SDK installation. Please read this post:
https://stackoverflow.com/questions/39760172/you-have-not-accepted-the-license-agreements-of-the-following-sdk-components

Hello,
We are having an issue where the ads network could not return any ads(the response has “no fill”). Are there any solution to this problem?

we are only able to receive the response once, but after that it always return with “NO_FILL”.

And why do admob ads not appear in debug? (refer to the images below)

8113106--1050902--Gley Ads problem (2).PNG )

Thx

Hello!
Your error indicates that your app should be enrolled firstly in a release (internal/close/open test or published) in the Google Play Console/ App Store. So please create one and test it via tester’s link.

Hello,
our games have been lagging because Ads were requested repeatedly. How can we stop requesting ads from the script? Thx

Use Custom[AdvertiserName].cs and set the retry count to 0

Assets\GoogleMobileAds\Editor\GleyAdmobPatch.cs(15,60): error CS0117: ‘GoogleMobileAdsSettings’ does not contain a definition for ‘Instance’

I want a solution to my problem

Hello! I have already replied on the support email. Check it out.:slight_smile:

any solution please ,.NB,./+%MP¨*#1231#°09876

did you fix it please

what is the solution please

Please use the latest version of Gley Mobile Ads and install the AdmobPatch as described in the documentation at page 32:
https://gleygames.com/documentation/Gley-MobileAds-Documentation.pdf

I got this errors after installing the IronSource SDK:

Prior to this I’ve installed admob and unity ads with no problems.

Hello,
Well, as the error says, there are duplicates in your project. Go to Assets/ExternalDependencyManager/Editor and delete all duplicate files:
i.e. Google.JarResolver.dll and Google.JarResolver_v1.2.169.dll are the same file, delete one of them.
I recommend to delete the files without the version (the simple names). Do that for all duplicates in that folder and that the error says about.

Admob works fine with Android, but when I change to iOS, the ads not show, and it turns out that USE_ADMOB is not defined, please help.

Hello,
Please send the steps you took to reproduce your scenario.
Make sure you press save in the Gley Settings Window. I know it sounds obvious, but it is a common mistake.
Follow this tutorial:

Thx, after several times uncheck and recheck iOS, it starts to works. But I have another question, call ShowRewardedVideo at the first time seems never show ads no matter how long I wait, every second try works fine, any idea?

Well, it should work as intended, so no time to wait before it appears any time (including the first time).
1.I suggest you to test the TestAds scene included in the package and compare it with your implementation.
2.Did you check on a real device? Enable debug mode from the Gley settings window and send the captures with the tryouts (gley.assets@gmail.com).

hey i buying this plugin add all thing step by step but I am not creating APK Build pls solve this problem (Everything is ok SDK , NDK Also Android 11.0 api level 30 using