Troubleshooting Guide

A- Resolution issues

1/ If you are using Android Studio 2020.3 or above, you need to add the repositories in settings.gradle file instead of build.gradle

2/ If you are getting this error while resolving the dependencies, please use VPN to be able to download IronSource libraries.

B- Build issues

1/ If you are getting this error during the compilation process, you need to set compileSdk version in build.gradle file to 31 or higher.

C- Testing issues (ads, crashes)

If you don’t see the ads while testing or if you app is crashing, you need to verify all the items in this checklist:

1/ The adaptive, smart, rectangle and large banners aren’t enabled by default, please contact your CSM if you want to use them.

2/ Make sure that your device ID is added in your MAS dashboard.

3/ Confirm that the ad formats are enabled.

4/ Make sure you are using the right AppKey, Admob ID and Bundle ID.

5/ If the test or live ads are working in your debug apk but not in your release apk, check out the logs. If you see Init failed and Error Code: -100501,config is null:

5.1- You need to disable Proguard if you are not using it by adding this code in your build.gradle file:

				
					minifyEnabled false 
useProguard false
				
			

5.2- If you are using proguard, you need to set minifyEnabled true and check this link to update your Proguard file.

6/ If you are getting this crash after Implementing the banner ads:

				
					 E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.yodo1.test, PID: 7837
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yodo1.test/com.yodo1.test.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.yodo1.mas.banner.Yodo1MasBannerAdView.setAdListener(com.yodo1.mas.banner.Yodo1MasBannerAdListener)' on a null object reference
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3685)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3842)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2252)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7842)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.yodo1.mas.banner.Yodo1MasBannerAdView.setAdListener(com.yodo1.mas.banner.Yodo1MasBannerAdListener)' on a null object reference
        at com.yodo1.test.MainActivity.onCreate(MainActivity.java:30)
        at android.app.Activity.performCreate(Activity.java:8054)
        at android.app.Activity.performCreate(Activity.java:8034)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3666)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3842) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2252) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loopOnce(Looper.java:201) 
        at android.os.Looper.loop(Looper.java:288) 
        at android.app.ActivityThread.main(ActivityThread.java:7842)
				
			

You need to implement the code at the right place in your activity.

If you are initializing the banner ads in onCreate() method, then always put the code after these two lines:

				
					super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
				
			
CONTENTS