Các lỗi có thể có trên bảng điều khiển
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tất cả thông báo được in trên bảng điều khiển sẽ có tiền tố [Ad Placement API]
:
Bạn chỉ có thể đặt trước{/5}Breaks một lần:
adConfig()
đã được gọi để đặt preloadAdBreaks
với giá trị <VALUE>
Đã cố gắng gọi adBreak()
trong khi một lệnh gọi khác đến adBreak()
vẫn đang diễn ra
(đảm bảo rằng bạn không kích hoạt quảng cáo của các trình chạy khác và bạn không
gọi adBreak()
từ trong hàm callback):
Cannot show ad while another ad is already visible.
Lỗi khi thực thi bất kỳ lệnh gọi lại nào bạn đã cung cấp:
<CALLBACK NAME> callback threw an error: <ERROR>
Lỗi trong thông số gắn thẻ:
Invalid data-ad-frequency-hint value: '<VALUE>'. It must be in format 'Xs'
where X is a number.
Unsupported data-adbreak-test value '<VALUE>'. Supported values: 'on'.
Lỗi xác thực đối số adConfig()
:
Invalid ad config: <ERROR>.
<ERROR>
có thể là:
preloadAdBreaks must be one of ['auto', 'on']
sound must be one of ['on', 'off']
onReady
phải là một hàm
Lỗi xác thực đối số adBreak()
:
Invalid placement config: <ERROR>
. <ERROR>
có thể là:
missing required properties <LIST OF PROPERTIES>
<CALLBACK NAME> must be a function
<PROPERTY NAME> must be one of <LIST OF VALID VALUES>
the following properties are not used for the given ad type:
<LIST OF PROPERTIES>
Đổi tên các lệnh gọi lại trong adBreak()
(beforeBreak
, afterBreak
và adComplete
lần lượt được đổi tên thành beforeAd
, afterAd
và adViewed
). Các API này
vẫn hoạt động giống như vậy:
Placement config: <OLD> has been renamed to <NEW>. Please update your code.
Invalid placement config: <OLD> has been renamed to <NEW>. Cannot pass both
fields. Please use <NEW> only.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2022-08-16 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2022-08-16 UTC."],[[["The Ad Placement API uses the prefix `[Ad Placement API]` for all console messages and allows preloading ad breaks only once using `adConfig()`."],["Developers should avoid calling `adBreak()` while another ad is displaying and ensure proper tagging parameters like `data-ad-frequency-hint` and `data-adbreak-test`."],["`adConfig()` and `adBreak()` require specific arguments, including callbacks, and will generate errors if invalid values are provided."],["Callbacks in `adBreak()` have been renamed (`beforeBreak` to `beforeAd`, `afterBreak` to `afterAd`, and `adComplete` to `adViewed`) and using the old names will result in errors."],["The API provides detailed error messages for troubleshooting, including specific reasons for failures and invalid configurations."]]],[]]