使用react-native-admob

时间:2019-02-07 21:44:57

标签: android react-native admob

我正在我的应用程序中使用react-native-admob,并且一切正常(Android和ios),除了某些广告一旦在Android 8,API 26上运行即可投放。有些广告可以展示,但有些则不能。这是我从日志中得到的一致错误。

我尝试将以下内容添加到AndroidManifest中,并使用不同的adUnitId失败

<meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="ca-app-pub-xxxxxxxxxxxxxxxxxxxxxx"/>

这是错误

 7469 W WebKit  : A Parser-blocking, cross site (i.e. different eTLD+1) script, https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
        02-07 21:28:00.872  7446  7469 W WebKit  : A Parser-blocking, cross site (i.e. different eTLD+1) script, https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
        02-07 21:28:00.878  7333  7333 W Ads     : JS: A Parser-blocking, cross site (i.e. different eTLD+1) script, https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details. (https://ads.rubiconproject.com/ad/8795.js:3)
        02-07 21:28:00.878  7333  7333 I chromium: [INFO:CONSOLE(3)] "A Parser-blocking, cross site (i.e. different eTLD+1) script, https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.", source: https://ads.rubiconproject.com/ad/8795.js (3)
        02-07 21:28:00.878  7333  7333 W Ads     : JS: A Parser-blocking, cross site (i.e. different eTLD+1) script, https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details. (https://ads.rubiconproject.com/ad/8795.js:3)
        02-07 21:28:00.878  7333  7333 I chromium: [INFO:CONSOLE(3)] "A Parser-blocking, cross site (i.e. different eTLD+1) script, https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.", source: https://ads.rubiconproject.com/ad/8795.js (3)
        02-07 21:28:01.240  7446  7469 W WebKit  : A Parser-blocking, cross site (i.e. different eTLD+1) script, http://www.googletagservices.com/tag/js/gpt.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
        02-07 21:28:01.241  7446  7469 W WebKit  : A Parser-blocking, cross site (i.e. different eTLD+1) script, http://www.googletagservices.com/tag/js/gpt.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
        02-07 21:28:01.242  7333  7333 W Ads     : JS: A Parser-blocking, cross site (i.e. different eTLD+1) script, http://www.googletagservices.com/tag/js/gpt.js, isinvoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details. (https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1:2)
        02-07 21:28:01.242  7333  7333 I chromium: [INFO:CONSOLE(2)] "A Parser-blocking, cross site (i.e. different eTLD+1) script, http://www.googletagservices.com/tag/js/gpt.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.", source: https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1 (2)
        02-07 21:28:01.242  7333  7333 E Ads     : JS: Mixed Content: The page at 'https://pubads.g.doubleclick.net/gampad/ads?_activity_context=false&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_mraid3_sdkVideo_th_autoplay_mediation_scroll_av_transparentBackground_sdkAdmobApiForAds_di_sfv_dinm_dim_nav_navc_dinmo_ipdof_gls_xSeconds&eid=318483745%2C318479959&format=320x50_mb&heap_free=13542264&heap_max=268435456&heap_total=30428640&js=afma-sdk-a-v12451000.12451000.0&msid=com.zumobi.android.motortrend&preqs=0&request_pkg=com.sbugert.rnadmob.ReactPublisher...vity_context=false&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_mraid3_sdkVideo_th_autoplay_mediation_scroll_av_transparentBackground_sdkAdmobApiForAds_di_sfv_dinm_dim_nav_navc_dinmo_ipdof_gls_xSeconds&eid=318483745%252C318479959&format=320x50_mb&heap_free=13542264&heap_max=268435456&heap_total=30428640&js=afma-sdk-a-v12451000.12451000.0&msid=com.zumobi.android.motortrend&preqs=0&request_pkg=com.sbugert.rnadmob.ReactPublisherAdView&scroll_index=-1&seq_num=1&target_api=26' was loaded over HTTPS, but requested an insecure script 'http://www.googletagservices.com/tag/js/gpt.js'. This request has been blocked; the content must be served over HTTPS. (https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1:2)
        02-07 21:28:01.242  7333  7333 I chromium: [INFO:CONSOLE(2)] "Mixed Content: The page at 'https://pubads.g.doubleclick.net/gampad/ads?_activity_context=false&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_mraid3_sdkVideo_th_autoplay_mediation_scroll_av_transparentBackground_sdkAdmobApiForAds_di_sfv_dinm_dim_nav_navc_dinmo_ipdof_gls_xSeconds&eid=318483745%2C318479959&format=320x50_mb&heap_free=13542264&heap_max=268435456&heap_total=30428640&js=afma-sdk-a-v12451000.12451000.0&msid=com.zumobi.android.motortrend&preqs=0&request_pkg=com.sbugert.rnadmob.ReactPublisher...vity_context=false&android_num_video_cache_tasks=0&caps=inlineVideo_interactiveVideo_mraid1_mraid2_mraid3_sdkVideo_th_autoplay_mediation_scroll_av_transparentBackground_sdkAdmobApiForAds_di_sfv_dinm_dim_nav_navc_dinmo_ipdof_gls_xSeconds&eid=318483745%252C318479959&format=320x50_mb&heap_free=13542264&heap_max=268435456&heap_total=30428640&js=afma-sdk-a-v12451000.12451000.0&msid=com.zumobi.android.motortrend&preqs=0&request_pkg=com.sbugert.rnadmob.ReactPublisherAdView&scroll_index=-1&seq_num=1&target_api=26' wasloaded over HTTPS, but requested an insecure script 'http://www.googletagservices.com/tag/js/gpt.js'. This request has been blocked; the content must be servedover HTTPS.", source: https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1 (2)
        02-07 21:28:01.242  7333  7333 W Ads     : JS: A Parser-blocking, cross site (i.e. different eTLD+1) script, http://www.googletagservices.com/tag/js/gpt.js, isinvoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details. (https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1:2)
        02-07 21:28:01.242  7333  7333 I chromium: [INFO:CONSOLE(2)] "A Parser-blocking, cross site (i.e. different eTLD+1) script, http://www.googletagservices.com/tag/js/gpt.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.", source: https://optimized-by.rubiconproject.com/a/8795/53518/246116-43.js?&cb=0.022579154963838777&tk_st=1&rp_s=c&p_exp=1&p_pos=btf&p_screen_res=360x640&ad_slot=53518_43&rp_secure=1 (2)

我希望这些广告能在Android 8,API 26及更高版本上展示。任何帮助将不胜感激。

0 个答案:

没有答案