Reklam yükleme hataları
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
AdResult nesneleri, reklam yükleme girişimlerinin başarısız olduğunu algılayan bir mekanizma sağlar.
Hata oluşursa AdResult yöntemi is_successful(), "false" değerini döndürür.
Bu gibi durumlarda, AdResult yöntemini ad_error() çağırmak, hatayla ilgili bilgileri içeren bir AdError nesnesi döndürür.
Bir reklam yüklenemediğinde kullanılabilen bilgileri gösteren bir kod snippet'i aşağıda verilmiştir:
firebase::Future<firebase::gma::AdResult>load_ad_future=ad_view->LoadAd(request);// In a game loop, monitor the load ad statusif(load_ad_future.status()==firebase::kFutureStatusComplete){constfirebase::gma::AdResult*ad_result=load_ad_future.result();if(!ad_result.is_successful()){// There was an error loading the ad.constAdError&ad_error=ad_result.ad_error();firebase::gma::AdErrorCodecode=ad_error.code();std::stringdomain=ad_error.domain();std::stringmessage=ad_error.message();constfirebase::gma::ResponseInforesponse_info=ad_error.response_info();printf("Received error with domain: %s, code: %d, message: %s and response info: %s\n”,domain.c_str(),message.c_str(),response_info.ToString().c_str());}}
Bu bilgiler, reklam yükleme işleminin başarısız olmasına neyin neden olduğunu daha doğru bir şekilde belirlemek için kullanılabilir. Özellikle iOS'te com.google.admob ve Android'de com.google.android.gms.ads alan adındaki hatalar için mesajı bu Yardım Merkezi makalesinde arayarak daha ayrıntılı bir açıklama ve sorunu çözmek için yapılabilecek olası işlemler hakkında bilgi edinebilirsiniz.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2026-11-05 UTC."],[],["The Google Mobile Ads C++ SDK is deprecated as of June 17, 2024, and will reach End-of-Maintenance on June 17, 2025. AdMob iOS and Android SDKs are recommended alternatives. `AdResult` objects detect failed ad loads; `is_successful()` indicates success, and `ad_error()` retrieves an `AdError` object for failures. The `AdError` includes error domain, code, message, and response info, which can be used to troubleshoot. Refer to the Google help center for specific error resolutions.\n"]]