AirlineRatings AdMob问题存档

基本环境

PS: 所有APPID与UnitID非项目中实际内容

APP ID:

  • 安卓: ca-app-pub-123123123~456456456
  • IOS: ca-app-pub-789789789~11111111

Unit ID:

  • 旧:
    • 安卓: ca-app-pub-123123123/00000000/WAN/AirlineRatings/mobilebanner
    • IOS: ca-app-pub-123123123/00000000/WAN/AirlineRatings/mobilebanner
  • 新:
    • 安卓: ca-app-pub-789789789/11111111/WAN/AirlineRatings/mobilebanner
    • IOS: ca-app-pub-789789789/11111111/WAN/AirlineRatings/mobilebanner
  • 谷歌提供的测试Unit ID: ca-app-pub-3940256099942544/2934735716

  • 差异: APP ID无变化,Unit ID安卓与IOS相同,新旧变化仅中间部分改变

已知错误类型:

  • error-code-internal-error:

      [Error: [admob/error-code-internal-error] Something happened internally; for instance, an invalid response was received from the ad server.]
    
  • admob/error-code-no-fill

      [Error: [admob/error-code-no-fill] The ad request was successful, but no ad was returned due to lack of ad inventory.]
    
  • admob/no-fill

      Error: [admob/no-fill] The ad request was successful, but no ad was returned due to lack of ad inventory.]
    
  • No ad to show

      Error: Request Error: No ad to show
    

对比测试:

  • 安卓测试:
Unit ID 结果
ca-app-pub-123123123/00000000/WAN/AirlineRatings/mobilebanner react-native-firebase error-code-internal-error
/00000000/WAN/AirlineRatings/mobilebanner react-native-firebase 拉取成功,广告内容正确
ca-app-pub-789789789/11111111/WAN/AirlineRatings/mobilebanner react-native-firebase admob/error-code-no-fill
/11111111/WAN/AirlineRatings/mobilebanner react-native-firebase error-code-internal-error
————分割线———
ca-app-pub-123123123/00000000/WAN/AirlineRatings/mobilebanner react-native-admob error-code-internal-error
/00000000/WAN/AirlineRatings/mobilebanner react-native-admob 拉取成功,广告内容正确
ca-app-pub-789789789/11111111/WAN/AirlineRatings/mobilebanner react-native-admob admob/error-code-no-fill
/11111111/WAN/AirlineRatings/mobilebanner react-native-admob error-code-internal-error
  • IOS测试:
Unit ID 结果
ca-app-pub-123123123/00000000/WAN/AirlineRatings/mobilebanner react-native-firebase admob/no-fill
/00000000/WAN/AirlineRatings/mobilebanner react-native-firebase admob/no-fill
ca-app-pub-789789789/11111111/WAN/AirlineRatings/mobilebanner react-native-firebase 拉取成功,广告内容不正确
/11111111/WAN/AirlineRatings/mobilebanner react-native-firebase admob/no-fill
———————-分割线———————
ca-app-pub-123123123/00000000/WAN/AirlineRatings/mobilebanner react-native-admob No ad to Show
/00000000/WAN/AirlineRatings/mobilebanner react-native-admob 拉取成功,广告内容正确
ca-app-pub-789789789/11111111/WAN/AirlineRatings/mobilebanner react-native-admob 拉取成功,广告内容不正确
/11111111/WAN/AirlineRatings/mobilebanner react-native-admob 拉取成功,广告内容正确
(谷歌测试UnitID)ca-app-pub-3940256099942544/2934735716 react-native-admob 拉取成功,广告内容正确

总结

  • react-native-firebase 库在IOS存在未知问题,无法正常拉取广告,目前配置已经和官方的文档要求一致,应该是存在未知的某些原因导致无法正常使用。使用谷歌提供的测试ID以及拉取到谷歌的随机广告时,双端都能正常工作,因此,可能对于用户自定义广告,存在一些支持问题。
  • react-native-admob 依旧存在某些情况下无法正常拉取广告的情况,安卓端完全无法拉取到新的UniteID的广告,IOS端对于完整的Unite ID书写方式无法正常识别,只能使用简写方式。应该依旧是存在某些广告设置原因,导致该库无法加载。但是总体表现是优于react-native-firebase

备注:

  • react-native-admob 对于新gradle语法支持存在一些问题,有可能出现以下错误:

      android.support.annotation does not exist
    

    将以下文件里面的 import android.support.annotation.Nullable; 全部修改为 import androidx.annotation.Nullable; 即可

      RNAdMobBannerViewManager.java
    
      RNAdMobInterstitialAdModule.java
    
      RNAdMobRewardedVideoAdModule.java
    
      RNPublisherBannerViewManager.java
    

results matching ""

    No results matching ""