AppLovin / AppLovin-MAX-SDK-Android

Other
229 stars 102 forks source link

Type of exception: java.lang.NoSuchMethodError #160

Closed saddam-work closed 2 years ago

saddam-work commented 2 years ago

using unity 2019.4.28f1 Max mediation 4.3.12 my crash rate reach 21% showing this error

# Type of exception: java.lang.NoSuchMethodError
# Exception message: No direct method <init>(Ljava/lang/String;Lcom/applovin/mediation/MaxAdFormat;Lcom/applovin/sdk/AppLovinSdk;Landroid/app/Activity;)V in class Lcom/applovin/mediation/ads/MaxAdView; or its super classes (declaration of 'com.applovin.mediation.ads.MaxAdView' appears in base.apk)
# Thread name: main
# Stacktrace: java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Lcom/applovin/mediation/MaxAdFormat;Lcom/applovin/sdk/AppLovinSdk;Landroid/app/Activity;)V in class Lcom/applovin/mediation/ads/MaxAdView; or its super classes (declaration of 'com.applovin.mediation.ads.MaxAdView' appears in base.apk)
    at com.applovin.mediation.unity.MaxUnityAdManager.retrieveAdView(MaxUnityAdManager.java:1327)
    at com.applovin.mediation.unity.MaxUnityAdManager.access$700(MaxUnityAdManager.java:59)
    at com.applovin.mediation.unity.MaxUnityAdManager$4.run(MaxUnityAdManager.java:927)
    at com.applovin.mediation.unity.Utils$1.run(Utils.java:27)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:246)
    at android.app.ActivityThread.main(ActivityThread.java:8633)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
santoshbagadi commented 2 years ago

Hi, it seems like there is a mismatch between our AppLovin Android SDK and the MAX Unity Android plugin versions.

Could you please share the verbose logs of our SDK and check what version of our SDK is is being used. You should see a log similar to the below with the SDK and plugin versions:

========================================
AppLovin SDK
Version: 10.0.0
Plugin Version: 
SafeDK Version: 
saddam-work commented 2 years ago
    ========================================
    =====AppLovin SDK=====
    ===SDK Versions===
    Version: 11.1.0
    Plugin Version: Max-Unity-4.3.12
    Ad Review Version: 
    OM SDK Version: 1.3.24-Applovin
    ===Device Info===
    OS: 10 (Q - API 29)
    GAID: <Enable verbose logging to see the GAID to use for test devices - https://monetization-support.applovin.com/hc/en-us/articles/236114328-How-can-I-expose-verbose-logging-for-the-SDK>
    Model: Redmi Note 9S
    Locale: en_GB
    Emulator: false
    WVVC: 447208833
    Tablet: false
    ===App Info===
    Application ID: com.fcg.bride.race.wedding.dressup.run
    Target SDK: 30
    ExoPlayer Version: 2013003
    ===SDK Settings===
    SDK Key: *********************************************************************************
    Mediation Provider: max
    TG: 32
    Test Mode On: false
    Verbose Logging On: false
    ===Privacy States===
    Please review AppLovin MAX documentation to be compliant with regional privacy policies.

    Age Restricted User - No value set
    Has User Consent - false
    "Do Not Sell" - No value set
    ========================================
santoshbagadi commented 2 years ago

Looks like what I mentioned above was the issue. It could be that External Dependency Manager is resolving to a newer version of our native SDK than what is set in the plugin.

You can fix this by upgrading to our latest plugin or delete existing dependencies and force resolve the dependencies by running Assets > External Dependency Manager > Android Resolver > Force Resove.