Android SDK PlayKitManager.loadPlayer Exception - NoSuchMethodError


#1

Hello,
I trying to test the example of playkit Player. I copied the same code from the following link:

when I run the code I receive the following exception:
11-08 15:33:33.640 18691-18691/com.scores365 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.scores365, PID: 18691
java.lang.NoSuchMethodError: No direct method (Lcom/kaltura/playkit/ads/AdsProvider;)V in class Lcom/kaltura/playkit/ads/AdEnabledPlayerController; or its super classes (declaration of ‘com.kaltura.playkit.ads.AdEnabledPlayerController’ appears in /data/app/com.scores365-j8ECLGwypCUuHRotZNP1WA==/base.apk:classes3.dex)
at com.kaltura.playkit.plugins.ima.IMAPlugin.getPlayerDecorator(IMAPlugin.java:137)
at com.kaltura.playkit.PlayerLoader.load(PlayerLoader.java:82)
at com.kaltura.playkit.PlayKitManager.loadPlayer(PlayKitManager.java:65)
at com.scores365.ui.PreVideoActivity.handlePlayerKit(PreVideoActivity.java:128)
at com.scores365.ui.PreVideoActivity.onCreate(PreVideoActivity.java:101)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
what can cause this kind of bug?
Thanks.


#2

please check if happens in 3.7.1:

probably gradle is not correct in what you used