應用程式內廣告的已知問題與疑難排解Known issues and troubleshooting for ads in apps

警告

從2020年6月1日起,適用于 Windows UWP 應用程式的 Microsoft Ad 營收平臺將會關閉。As of June 1, 2020, the Microsoft Ad Monetization platform for Windows UWP apps will be shut down. 深入了解Learn more

本主題列出 Microsoft Advertising SDK 目前版本的已知問題。This topic lists the known issues with the current release of the Microsoft Advertising SDK. 如需其他疑難排解指導方針,請參閱下列主題。For additional troubleshooting guidance, see the following topics.

AdControl 介面於 XAML 中為未知AdControl interface unknown in XAML

AdControl 的 XAML 標記可能會不正確地顯示藍色曲線,意指該介面為未知。The XAML markup for an AdControl may incorrectly show a blue curvy line implying that the interface is unknown. 這只會在以 x86 為目標時發生,並可以忽略它。This occurs only when targeting x86, and it may be ignored.

來自先前廣告要求的 lastErrorlastError from previous ad request

如果有來自先前廣告要求的剩餘 lastError,事件可能會在下一個廣告呼叫期間被觸發兩次。If there is a leftover lastError from the previous ad request, the event may be fired twice during the next ad call. 雖然仍然會做出新的廣告要求,並可能產生有效的廣告,此行為可能會造成混淆。While the new ad request will still be made and may yield a valid ad, this behavior may cause confusion.

手機上的插入式廣告和瀏覽按鈕Interstitial ads and navigation buttons on phones

在具有軟體 [返回][開始][搜尋] 按鈕的手機 (或模擬器) 上,插播式廣告的倒數計時器和點選按鈕可能會被遮住。On phones (or emulators) that have software Back, Start, and Search buttons instead of hardware buttons, the countdown timer and click through buttons for interstitial ads may be obscured.

最近建立的廣告未被提供到您的 AppRecently created ads are not being served to your app

如果您最近有建立廣告 (一天之內),它可能無法立即可用。If you have created an ad recently (less than a day), it might not be available immediately. 如果廣告的編輯內容已受到核准,則會在廣告伺服器處理完畢,且該廣告能做為詳細目錄提供時提供。If the ad has been approved for editorial content, it will be served once the advertising server has processed it and the ad is available as inventory.

您的 App 中沒有顯示廣告No ads are shown in your app

有很多原因會使您看不見廣告,包括網路錯誤。There are many reasons you may see no ads, including network errors. 其他原因可能包含:Other reasons might include:

  • 在合作夥伴中心中選取的 ad 單位大小大於或小於您應用程式程式碼中的 AdControl 大小。Selecting an ad unit in Partner Center with a size that is greater or less than the size of the AdControl in your app's code.

  • 如果您在執行實際 App 時使用測試模式值做為您的廣告單位識別碼,則廣告將不會出現。Ads will not appear if you're using a test mode value for your ad unit ID when running a live app.

  • 如果您在過去半個小時之內建立新的廣告單位識別碼,在伺服器將新資料傳播至整個系統之前,您可能看不見廣告。If you created a new ad unit ID in the past half-hour, you might not see an ad until the servers propagate new data through the system. 先前已顯示過廣告的現有識別碼應該會立即顯示廣告。Existing IDs that have shown ads before should show ads immediately.

如果您可以在 App 中看見測試廣告,便代表您的程式碼運作正常並可以顯示廣告。If you can see test ads in the app, your code is working and is able to display ads. 如果您遭遇到問題,請連絡產品支援If you encounter issues, contact product support. 在該頁面上,選擇 [ Contact us]。On that page, choose Contact us.

您也可以在論壇中張貼問題。You can also post a question in the forum.

您的 App 中顯示測試廣告而不是實際廣告Test ads are showing in your app instead of live ads

就算您是預期實際廣告,仍有可能會顯示測試廣告。Test ads can be shown, even when you are expecting live ads. 這可能會在下列案例中發生:This can happen in the following scenarios:

  • 我們的廣告平台無法驗證或找不到在 Microsoft Store 中使用的實際應用程式識別碼。Our advertising platform cannot verify or find the live application ID used in the Store. 在此情況下,當使用者建立廣告單位時,廣告單位的狀態一開始可能會是實際運作 (非測試),但將會在第一次廣告要求後的 6 小時內移至測試狀態。In this case, when an ad unit is created by a user, its status can start as live (non-test) but will move to test status within 6 hours after the first ad request. 如果在 10 天內沒有任何來自測試 App 的要求,它將會變更回實際運作的狀態。It will change back to live if there are no requests from test apps for 10 days.

  • 側載 App 或在模擬器中執行的 App 將不會顯示實際廣告。Side-loaded apps or apps that are running in the emulator will not show live ads.

當即時 ad 單位提供測試廣告時,ad 單位的狀態會顯示為作用中,並在合作夥伴中心中 提供測試廣告When a live ad unit is serving test ads, the ad unit’s status shows Active and serving test ads in Partner Center. 目前這並不適用於手機 App。This does not currently apply to phone apps.

專案中因目標為 [任何 CPU] 所造成的參考錯誤Reference errors caused by targeting Any CPU in your project

使用 Microsoft Advertising SDK 時,您在專案中將無法以 [任何 CPU] 為目標。When using the Microsoft Advertising SDK, you cannot target Any CPU in your project. 如果您的專案以 [任何 CPU] 平台為目標,您在新增類似下列的參照之後可能會看見警告。If your project targets the Any CPU platform, you may see a warning after adding the reference similar to this one.

referenceerror - 方案總管

如果要移除這項警告,請將您的專案更新成使用架構特定的建置輸出 (例如 x86)。To remove this warning, update your project to use an architecture-specific build output (for example, x86). 使用 [組態管理員] 來針對偵錯和發行組態設定平台目標。Use Configuration Manager to set the platform targets for debug and release configurations.

configurationmanagerwin10

當您針對 Microsoft Store 提交建立應用程式套件 (如下列影像所示),請務必包含您想要做為目標的架構。When you create your app packages for store submission (as shown in the following images), be sure to include the architectures you intend to target. 如果您想要在 x64 OS 上執行 x86 組建,您可以選擇略過 x64。You may opt to skip x64 if you intend to run x86 builds on the x64 OS.

projectstorecreateapppackages

createapppackages

JavaScript/HTML App 中的 Z 軸順序Z-order in JavaScript/HTML apps

JavaScript/HTML App 不能將元素置於 Z 軸順序的保留 MAX-10 範圍內。JavaScript/HTML apps must not place elements into the reserved MAX-10 range of z-order. 唯一的例外是插斷覆疊,例如 Skype App 的輸入呼叫通知。The sole exception is an interrupt overlay, such as an inbound call notification for a Skype app.

請不要使用邊界。Do not use borders

設定由 AdControl 從其父類別繼承的邊界相關屬性,將會造成廣告位置錯誤。Setting border-related properties inherited by the AdControl from its parent class will cause the ad placement to be wrong.

相關資訊More Information

如需最新已知問題的詳細資訊,或是張貼 Microsoft Advertising SDK 的相關問題,請造訪論壇For more information about the latest known issues and to post questions related to the Microsoft Advertising SDK, visit the forum.