跳转到内容

错误处理

如果广告加载或展示失败,您的广告展示委托或回传接口会收到调用。 该调用带有一个错误代码。 本页介绍了这些错误代码。

错误对象

您在回传中收到的错误是一等 (first-class) 错误对象。 该对象具有两个属性:

error.code
错误代码,见下表
error.message
描述该错误的可读信息

MAX 错误代码

代码描述Load / Display
204No ads are eligible for your device (no fill). MAX returned no eligible ads from any mediated networks for this app/device.L
-1The system is in an unexpected state. This error code represents an error that MAX could not categorize into one of the other defined errors. See the message field in the error object for more details.L/D
-23您尝试展示一则全屏广告 (插屏广告或激励广告),但另一则全屏广告仍在展示。D
-24您试图在广告加载完成之前显示全屏广告。D
-1000由于一般网络错误,广告请求失败。请查看错误对象中的消息字段,了解更多详情。L
-1001由于网速较慢,广告请求超时。L
-1009设备未连接至互联网,广告请求失败。L
-5001无平台可填充广告,因此加载失败。MAX 已返回来自聚合平台的符合条件的广告,但所有广告均加载失败。L
-5201The internal state of the SDK is invalid.L
-5205适配器在尝试展示时没有已准备好的广告。L
-5209未指明的内部错误。L
-5601SDK 无法加载广告,因为找不到最顶层的 ActivityL
-5602SDK 未能展示广告,因为用户启用了 “Don’t Keep Activities” 开发者设置。D
-5603The SDK failed to load an ad because the publisher provided an invalid ad unit identifier. Possible reasons for an invalid ad unit identifier:
  • ad unit identifier is malformed or does not exist
  • ad unit is disabled
  • ad unit is not associated with the current app’s package name
  • ad unit was created in the last 30–60 minutes
L

不同平台的错误代码

要进一步了解不同广告平台返回的错误代码,请查看这些平台发布的错误相关文档: