我有Unity 5.4.1f1 我有admob Unity sdk 3.1.0版
我设置了一个admob帐户,然后点了these steps
当我为Android进行构建时,我遇到以下错误
当我玩的时候,我收到以下消息
这是其中一个错误的完整版本
WARNING: No compatible versions of com.android.support:support-v4 required by (com.android.support:appcompat-v7:23.1.0+, com.google.android.gms:play-services-basement:9.6.1), will try using the latest version 24.0.0
UnityEngine.Debug:Log(Object)
Google.JarResolver.PlayServicesSupport:Log(String, Boolean)
Google.JarResolver.PlayServicesSupport:ResolveDependencies(Boolean)
GooglePlayServices.ResolverVer1_1:DoResolutionNoAndroidPackageChecks(PlayServicesSupport, String, OverwriteConfirmation)
GooglePlayServices.<DoResolution>c__AnonStorey1:<>m__0()
GooglePlayServices.ResolverVer1_1:DoResolution(PlayServicesSupport, String, OverwriteConfirmation, Action)
GooglePlayServices.PlayServicesResolver:Resolve(Action)
GooglePlayServices.PlayServicesResolver:AutoResolve()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
请注意,我已经使用了Chartboost。
到目前为止,我无法使用以下代码在编辑器或构建中显示admob广告。
private void RequestAdmobInterstitial()
{
#if UNITY_ANDROID
string adUnitId = "my ad unit id";
#elif UNITY_IPHONE
string adUnitId = "INSERT_IOS_INTERSTITIAL_AD_UNIT_ID_HERE";
#else
string adUnitId = "unexpected_platform";
#endif
// Initialize an InterstitialAd.
InterstitialAd interstitial = new InterstitialAd(adUnitId);
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the interstitial with the request.
interstitial.LoadAd(request);
}
在构建中没有任何反应,在编辑器中我收到这些消息
这些错误是为什么它起作用? 如果是这样,我该如何修复它们?
答案 0 :(得分:1)