AdInspectorError

public final class AdInspectorError extends AdError


有关广告检查器失败原因的错误信息。

摘要

嵌套类型

AdInspectorError 支持的常量。

常量

static final int

广告检查器已打开,因此无法再次打开。

static final int

广告检查器未能加载。

static final int

广告检查器遇到了内部错误。

static final int

由于设备未处于测试模式,因此无法打开广告检查器。

公共构造函数

AdInspectorError(
    @AdInspectorError.AdInspectorErrorCode int code,
    @NonNull String message,
    @NonNull String domain
)

创建一个 AdInspectorError

公共方法

int

获取错误的代码。

继承的常量

来自 com.google.android.gms.ads.AdError
static final String
UNDEFINED_DOMAIN = "undefined"

未定义的错误网域。

继承的方法

来自 com.google.android.gms.ads.AdError
@Nullable AdError

获取此错误的原因,如果原因不存在或未知,则返回 null

@NonNull String

获取错误的网域。

@NonNull String

获取描述相应错误的消息。

String

返回此对象的日志友好型字符串版本。

常量

ERROR_CODE_ALREADY_OPEN

public static final int ERROR_CODE_ALREADY_OPEN = 3

广告检查器已打开,因此无法再次打开。

ERROR_CODE_FAILED_TO_LOAD

public static final int ERROR_CODE_FAILED_TO_LOAD = 1

广告检查器未能加载。

ERROR_CODE_INTERNAL_ERROR

public static final int ERROR_CODE_INTERNAL_ERROR = 0

广告检查器遇到了内部错误。

ERROR_CODE_NOT_IN_TEST_MODE

public static final int ERROR_CODE_NOT_IN_TEST_MODE = 2

由于设备未处于测试模式,因此无法打开广告检查器。如需了解详情,请参阅 https://developers.google.com/admob/android/test-ads#enable_test_devices。

公共构造函数

AdInspectorError

public AdInspectorError(
    @AdInspectorError.AdInspectorErrorCode int code,
    @NonNull String message,
    @NonNull String domain
)

创建一个 AdInspectorError

参数
@AdInspectorError.AdInspectorErrorCode int code

错误代码。

@NonNull String message

详细说明错误的消息。

@NonNull String domain

错误网域。

公共方法

getCode

@AdInspectorError.AdInspectorErrorCode
public int getCode()

获取错误的代码。