Errori di caricamento degli annunci
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Seleziona la piattaforma:
Android
iOS
Unity
Flutter
Quando un annuncio non viene caricato, viene chiamato un callback di errore che fornisce un oggetto LoadAdError
.
Il seguente snippet di codice recupera le informazioni sugli errori quando il caricamento di un annuncio con premio non va a buon fine:
onAdFailedToLoad: (ad, loadAdError) {
// Gets the domain from which the error came.
String domain = loadAdError.domain;
// Gets the error code. See
// https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdRequest
// and https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Enums/GADErrorCode
// for a list of possible codes.
int code = loadAdError.code;
// A log friendly string summarizing the error.
String message = loadAdError.message;
// Get response information, which may include results of mediation requests.
ResponseInfo? responseInfo = loadAdError.responseInfo;
}
Queste informazioni possono essere utilizzate per determinare con maggiore precisione la causa del mancato caricamento dell'annuncio. In particolare, per gli errori nel dominio com.google.admob
su
iOS e com.google.android.gms.ads
su Android, il GetMessage()
può essere
consultato in questo articolo del Centro assistenza per una spiegazione più dettagliata e le possibili azioni da intraprendere per risolvere il problema.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-08-10 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-08-10 UTC."],[[["When an ad fails to load, a `LoadAdError` object is provided in the failure callback, containing details about the error."],["The `LoadAdError` object provides information such as the error domain, code, message, and response details for debugging purposes."],["For errors originating from Google AdMob (domains `com.google.admob` or `com.google.android.gms.ads`), further information and troubleshooting steps can be found in the AdMob help center article linked in the documentation."]]],["When an ad fails to load, a `LoadAdError` object is provided via a callback. This object contains error details, including the error's domain, a specific error code, a summarized message, and response information that could be related to mediation. For errors originating from `com.google.admob` (iOS) or `com.google.android.gms.ads` (Android), the message can be checked in a help center article for in-depth information and potential solutions. This information helps to pinpoint the cause of ad loading failure.\n"]]