问题
I am using the facebook audience network in Unity for advertisement. I am currently facing an issue while showing facebook banner ads in unity. Just when i call banner ad show call. Exception triggers:
java.lang.illegalargumentexception: adsize at com.facebook.ads.redexgen.x.8h.(:18251)
Anybody knows how can I resolve this issue? Thanks in advance
回答1:
I am also facing banner loading issue
E/Unity (27746): AndroidJavaException: java.lang.IllegalArgumentException: adSize
E/Unity (27746): java.lang.IllegalArgumentException: adSize
E/Unity (27746): at com.facebook.ads.redexgen.X.8h.<init>(:18251)
com.facebook.ads.internal.dynamicloading.DynamicLoaderImpl.createAdViewApi(:112)
E/Unity (27746): at com.facebook.ads.AdView.<init>(AdView.java:107)
E/Unity (27746): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
E/Unity (27746): at com.unity3d.player.UnityPlayer.c(Unknown Source)
E/Unity (27746): at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source)
E/Unity (27746): at android.os.Handler.dispatchMessage(Handler.java:98)
E/Unity (27746): at android.os.Looper.loop(Looper.java:135)
E/Unity (27746): at com.unity3d.player.UnityPlayer$e.run(Unknown Source)
E/Unity (27746): at UnityEngine.AndroidJNISafe.CheckException () [0x00091] in <5aceb54cdbcc492fbae9ab05aab81814>:0
E/Unity (27746): at UnityEngine.AndroidJNISafe.NewObject (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) [0x00011] in <5aceb54cdbcc492fbae9ab05aab8181
来源:https://stackoverflow.com/questions/59062922/facebook-banner-ad-issue-in-unity