我遇到此错误: Assets \ Find Pairs \ Scripts \ AdsManager.cs(54,43):错误CS1503:参数1:无法从“ GoogleMobileAds.Api.InterstitialAd”转换为“ string” 使用以下代码:
python manage.py makemigrations background_task
我收到此错误: Assets \ Find Pairs \ Scripts \ AdsManager.cs(54,43):错误CS1503:参数1:无法从“ GoogleMobileAds.Api.InterstitialAd”转换为“ string”
我需要帮助
答案 0 :(得分:1)
public void RequestFullScreenAd()
{
fullScreenAd = new InterstitialAd(fullScreenAd);
AdRequest request = new AdRequest.Builder().Build();
fullScreenAd.LoadAd(request);
}
您尝试在创建新的InterstitialAd对象时将InterstitialAd对象作为字符串参数传递。它需要一个声明为fullScreenAdID的ID(字符串)。所以,
public void RequestFullScreenAd()
{
fullScreenAd = new InterstitialAd(fullScreenAdID);
AdRequest request = new AdRequest.Builder().Build();
fullScreenAd.LoadAd(request);
}
应该工作。