androidinmobi

NoSuchMethodError in inMobi SDK on Android 2.3


I am integrating interstitial ads through MoPub. InMobi ads are working fine on the tests I did on Android 5+. However it is giving me a problem in my Android 2.3 device.

The integrated InMobi SDK version is 5.1.0. As far as I know, registerComponentCallbacks was added in Android API 14 (also known as Ice Cream Sandwich).

InMobi sample included with the SDK has minSdkVersion=9, so it is supposed to be working on a Gingerbread device (mine is API 10).

Is there anything I could do to prevent this to make my app to be force-closed?

Stacktrace:

java.lang.NoSuchMethodError: Android.app.Application.registerComponentCallbacks
at com.inmobi.ads.i.f(Unknown Source)
at com.inmobi.ads.i.<init>(Unknown Source)
at com.inmobi.ads.i.a(Unknown Source)
at com.inmobi.sdk.InMobiSdk.initComponents(Unknown Source)
at com.inmobi.sdk.InMobiSdk.init(Unknown Source)
at com.mopub.mobileads.InMobiInterstitialMoPub.loadInterstitial(Unknown Source)
at com.mopub.mobileads.CustomEventInterstitialAdapter.a(Unknown Source)
at com.mopub.mobileads.MoPubInterstitial$MoPubInterstitialView.a(Unknown Source)
at com.mopub.mobileads.c.a(Unknown Source)
at com.mopub.mobileads.AdViewController.a(Unknown Source)
at com.mopub.mobileads.AdViewController$1.onSuccess(Unknown Source)
at com.mopub.network.AdRequest.a(Unknown Source)
at com.mopub.network.AdRequest.deliverResponse(Unknown Source)
at com.mopub.volley.a.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3835)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)

Solution

  • we do not support Android versions <4.0 on the InMobi SDK 5.x. I recommend that you change the minSDKVersion value within your app