광고 로드 오류

광고 로드에 실패하면 실패 콜백이 호출되어 LoadAdError 객체.

다음 코드 스니펫은 광고 로드에 실패할 때 오류 정보를 검색합니다.

public void OnAdFailedToLoad(LoadAdError error)
{
    // Gets the domain from which the error came.
    string domain = error.GetDomain();

    // Gets the error code. See
    // https://developers.google.com/android/reference/com/google/android/gms/ads/AdRequest
    // and https://developers.google.com/admob/ios/api/reference/Enums/GADErrorCode
    // for a list of possible codes.
    int code = error.GetCode();

   // Gets an error message.
   // For example "Account not approved yet". See
   // https://support.google.com/admob/answer/9905175 for explanations of
   // common errors.
   string message = error.GetMessage();

   // Gets the cause of the error, if available.
   AdError underlyingError = error.GetCause();

   // All of this information is available via the error's toString() method.
   Debug.Log("Load error string: " + error.ToString());

   // Get response information, which may include results of mediation requests.
   ResponseInfo responseInfo = error.GetResponseInfo();
   Debug.Log("Response info: " + responseInfo.ToString());
}

이 정보를 사용하면 광고가 게재된 이유를 더욱 정확하게 파악할 수 있습니다. 로드가 실패합니다 특히 도메인의 com.google.admob 도메인에서 발생하는 오류의 경우 iOS 및 com.google.android.gms.ads Android의 경우 GetMessage()는 이 도움말 센터에서 조회했습니다. 자세한 내용은 이 도움말을 참고하세요. 문제를 해결하기 위해 취할 수 있는 조치