我将 applovin SDK 集成到 unity android 中,但在 Android 设备上运行时出现此错误:
错误:UnityEngine.AndroidJavaException:java.lang.ClassNotFoundException:com.applovin.sdk.unity.AppLovinFacade
这是我的代码:
public class ApplovinHandler : MonoBehaviour {
public Text logtxt;
void Awake () {
try{
AppLovin.InitializeSdk ();
AppLovin.SetTestAdsEnabled ("true");
AppLovin.SetUnityAdListener ("ApplovinHandler");
ShowBanner ();
}catch(Exception e){
logtxt.text += e + "/n";
}
}
public void ShowBanner ()
{
logtxt.text = "Show banner ads";
AppLovin.ShowAD(AppLovin.AD_POSITION_CENTER,AppLovin.AD_POSITION_BOTTOM);
}