Could you please provide the runtime error that you are encountering?
Could you provide the manifest error that you encountered on your end?
Could you please provide the following details so we could further check this concern?


SECOND ONE A:

This is the error in Unity Console:
CommandInvokationFailure: Unable to merge android manifests.
C:/Program Files/Java/jdk1.8.0_121\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/Jordan/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "I:\Unity2018\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
]
stdout[
[Temp\StagingArea\AndroidManifest-main.xml, I:\testmediacion2\Temp\StagingArea\android-libraries\com.android.support.support-compat-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[Temp\StagingArea\AndroidManifest-main.xml, I:\testmediacion2\Temp\StagingArea\android-libraries\com.android.support.support-core-ui-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[Temp\StagingArea\AndroidManifest-main.xml, I:\testmediacion2\Temp\StagingArea\android-libraries\com.android.support.support-core-utils-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[Temp\StagingArea\AndroidManifest-main.xml, I:\testmediacion2\Temp\StagingArea\android-libraries\com.android.support.support-fragment-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[Temp\StagingArea\AndroidManifest-main.xml, I:\testmediacion2\Temp\StagingArea\android-libraries\com.android.support.support-media-compat-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
[Temp\StagingArea\AndroidManifest-main.xml, I:\testmediacion2\Temp\StagingArea\android-libraries\com.android.support.support-v4-26.1.0\AndroidManifest.xml:6] Skipping identical /manifest/application/meta-data[@name=android.support.VERSION] element.
Warning: [Temp\StagingArea\AndroidManifest-main.xml:12, I:\testmediacion2\Temp\StagingArea\android-libraries\com.applovin.applovin-sdk-9.2.1\AndroidManifest.xml:3] Main manifest has <uses-sdk android:targetSdkVersion='27'> but library uses targetSdkVersion='28'
[Temp\StagingArea\AndroidManifest-main.xml, I:\testmediacion2\Temp\StagingArea\android-libraries\GoogleMobileAdsAppLovinMediation\AndroidManifest.xml:9] Skipping identical /manifest/application/activity[@name=com.applovin.adview.AppLovinInterstitialActivity] element.
[Temp\StagingArea\AndroidManifest-main.xml, I:\testmediacion2\Temp\StagingArea\android-libraries\GoogleMobileAdsAppLovinMediation\AndroidManifest.xml:11] Skipping identical /manifest/application/activity[@name=com.applovin.adview.AppLovinConfirmationActivity] element.
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommand (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg, Int32 memoryMB)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
3º) Now I create a scene with a simple button to load an advertisment. I attach the next code to the button that invoke the "ShowAd" method. I build the solution, then I start the app, I press the button and Applovin advertisment is shown.Perfect!
#define USE_ADMOB#define ADVERTISMENT#define APP_LOVIN//#define UNITY_ADS//#define TEST_DEVICE//#define VUNGLE_ACTIVE
using UnityEngine.Networking;using UnityEngine;using System;using System.Collections;#if ADVERTISMENT#if APP_LOVINusing GoogleMobileAds.Api.Mediation.AppLovin;#endif
#if UNITY_ADSusing GoogleMobileAds.Api.Mediation.UnityAds;#endifusing GoogleMobileAds.Api;using UnityEngine.Advertisements;#endif
public class UnityAdsTest : MonoBehaviour{
#if ADVERTISMENT
public static string androidGameId = "Insert your admob game id here"; public static string androidRewarded = "Insert your admob rewarded placement code here"; public static RewardBasedVideoAd rewardBasedVideo;
protected string gameId;#endif
public static UnityAdsTest AdsInstance; /// <summary> /// /// </summary> public void Awake() { AdsInstance = this;
}
/// <summary> /// /// </summary> private void Start() { ADMOBInitAds(); }
/// <summary> /// /// </summary> private void OnDestroy() { ADMOBDestroyAll(); }
#if ADVERTISMENT
/// <summary> /// /// </summary> void ADMOBInitAds() {#if UNITY_IOS // If build platform is set to iOS... gameId = iosGameId;#elif UNITY_ANDROID // Else if build platform is set to Android... gameId = androidGameId;#endif
MobileAds.SetiOSAppPauseOnBackground(true); MobileAds.Initialize(gameId);#if APP_LOVIN AppLovin.Initialize(); #endif ADMOBPrepareRewarded();
}
/// <summary> /// /// </summary> void ADMOBDestroyAll() { if (rewardBasedVideo != null) { rewardBasedVideo.OnAdLoaded -= ADMOBHandleRewardBasedVideoLoaded; // Called when an ad request failed to load. rewardBasedVideo.OnAdFailedToLoad -= ADMOBHandleRewardBasedVideoFailedToLoad; // Called when an ad is shown. rewardBasedVideo.OnAdOpening -= ADMOBHandleRewardBasedVideoOpened; // Called when the ad starts to play. rewardBasedVideo.OnAdStarted -= ADMOBHandleRewardBasedVideoStarted; // Called when the user should be rewarded for watching a video. rewardBasedVideo.OnAdRewarded -= ADMOBHandleRewardBasedVideoRewarded; // Called when the ad is closed. rewardBasedVideo.OnAdClosed -= ADMOBHandleRewardBasedVideoClosed; // Called when the ad click caused the user to leave the application. rewardBasedVideo.OnAdLeavingApplication -= ADMOBHandleRewardBasedVideoLeftApplication;
}
}
/// <summary> /// /// </summary> protected static void ADMOBPrepareRewarded() { rewardBasedVideo = RewardBasedVideoAd.Instance; rewardBasedVideo.OnAdLoaded += ADMOBHandleRewardBasedVideoLoaded; // Called when an ad request failed to load. rewardBasedVideo.OnAdFailedToLoad += ADMOBHandleRewardBasedVideoFailedToLoad; // Called when an ad is shown. rewardBasedVideo.OnAdOpening += ADMOBHandleRewardBasedVideoOpened; // Called when the ad starts to play. rewardBasedVideo.OnAdStarted += ADMOBHandleRewardBasedVideoStarted; // Called when the user should be rewarded for watching a video. rewardBasedVideo.OnAdRewarded += ADMOBHandleRewardBasedVideoRewarded; // Called when the ad is closed. rewardBasedVideo.OnAdClosed += ADMOBHandleRewardBasedVideoClosed; // Called when the ad click caused the user to leave the application. rewardBasedVideo.OnAdLeavingApplication += ADMOBHandleRewardBasedVideoLeftApplication; }
/// <summary> /// /// </summary> public void ShowAd() { StopAllCoroutines(); ADMOBRequestRewardBasedVideo(); StartCoroutine(WaitToShow()); }
/// <summary> /// /// </summary> /// <returns></returns> IEnumerator WaitToShow() { while( rewardBasedVideo != null && !rewardBasedVideo.IsLoaded()) { yield return null; }
if( rewardBasedVideo != null && rewardBasedVideo.IsLoaded()) { rewardBasedVideo.Show(); } }
/// <summary> /// /// </summary> /// <param name="fail"></param> public static void ADMOBRequestRewardBasedVideo() {#if UNITY_ANDROID string adUnitId = androidRewarded;#elif UNITY_IPHONE string adUnitId = iosRewarded;#else string adUnitId = "unexpected_platform";#endif
// Create an empty ad request.
AdRequest.Builder builder = null; // Create an empty ad request.
#if TEST_DEVICE builder = new AdRequest.Builder().AddTestDevice(@"Your device id");
#else builder = new AdRequest.Builder();#endif#if VUNGLE_ACTIVE VungleRewardedVideoMediationExtras extras = new VungleRewardedVideoMediationExtras();#if UNITY_ANDROID extras.SetAllPlacements(new string[] { "ANDROID_PLACEMENT_1", "ANDROID_PLACEMENT_2" });#elif UNITY_IPHONE extras.SetAllPlacements(new string[] { "IOS_PLACEMENT_1", "IOS_PLACEMENT_2" });#endif
builder = builder.AddMediationExtras(extras);#endif
Debug.Log("Loaded Rewarded");
AdRequest request = builder.Build(); //AdRequest request = new AdRequest.Builder().Build(); // Load the rewarded video ad with the request. rewardBasedVideo.LoadAd(request, adUnitId); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="args"></param> static public void ADMOBHandleRewardBasedVideoLoaded(object sender, EventArgs args) { Debug.Log("ADMOBHandleRewardBasedVideoLoaded");
}
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="args"></param> static public void ADMOBHandleRewardBasedVideoFailedToLoad(object sender, AdFailedToLoadEventArgs args) { Debug.Log("HandleRewardBasedVideoOpened event fail to load + " + args.Message ); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="args"></param> static public void ADMOBHandleRewardBasedVideoOpened(object sender, EventArgs args) { Debug.Log("HandleRewardBasedVideoOpened event received"); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="args"></param> static public void ADMOBHandleRewardBasedVideoStarted(object sender, EventArgs args) { Debug.Log("HandleRewardBasedVideoStarted event received"); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="args"></param> static public void ADMOBHandleRewardBasedVideoClosed(object sender, EventArgs args) { Debug.Log("HandleRewardBasedVideoClosed event received"); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="args"></param> static public void ADMOBHandleRewardBasedVideoRewarded(object sender, Reward args) {
Debug.Log("HandleRewardBasedVideoRewarded event");
}
static public void ADMOBHandleRewardBasedVideoLeftApplication(object sender, EventArgs args) { Debug.Log("HandleRewardBasedVideoLeftApplication event received"); }
#endif}
Hi,
Apologies for the back and forth.
With regard to issue#3, please note that the availability of the ad is not controlled by the Mobile Ads SDK.
Since you mentioned that your are having a problem displaying an ad from the Third-party network, I suggest to contact their respective support channel for further assistance.--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/1ee345e2-ce6c-437a-b7e1-7e3dbc11e2ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Teejay Pimentel,Could you give the email to contact with Product Support Team, please?Thanks in advance.
--
---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/14ee52cf-b9be-42ea-aad3-f917ce445e4d%40googlegroups.com.