簡體   English   中英

反應原生(博覽會)應用程序中的 Admob 未顯示

[英]Admob in react-native (expo) app not displaying

我剛剛為我的 android 應用程序應用了一個生產廣告單元 id(未發布到 google play,我正在我的手機和模擬器上測試產品 ad-unit-id 但廣告不顯示,源代碼如下這個

// Display a banner
<AdMobBanner
  bannerSize="fullBanner"
  adUnitID="ca-app-pub-3940256099942544/6300978111" // Test ID, Replace with your-admob-unit-id
  testDeviceID="EMULATOR"
  onDidFailToReceiveAdWithError={this.bannerError} />

https://docs.expo.io/versions/latest/sdk/admob/

上面帶有測試 id 的代碼顯示在我的應用程序中(在我的手機和模擬器上測試),但我使用我的讀取密鑰,有人知道問題是什么嗎?

// Display a banner
<AdMobBanner
  adSize="fullBanner"
  adUnitID="your-admob-unit-id"
  testDevices={[AdMobBanner.simulatorId]}
  onAdFailedToLoad={error => console.error(error)}
/>

將測試設備 ID 放入 testDevices 中

testDevices={"sdflhfdshfsdgudsgfuydsgfydsgftysdfdfgsh"}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM