无法使用 mopub 从 admob 获取广告

Not able to get ads from admob with mopub(无法使用 mopub 从 admob 获取广告)
本文介绍了无法使用 mopub 从 admob 获取广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这几天我一直在尝试在我的应用上投放广告.我已经完成了所有设置、订单项、横幅、admob ID(带有 ca-app.... 的那个),我得到了正确的 mopub ID 和所有内容.但是我仍然收到此消息:

12-16 20:13:44.984 2778-2778/com.spekz D/skia: GFXPNG PNG 位图创建宽度:720 高度:279 位图 id 为 18412-16 20:13:44.994 2778-2778/com.spekz D/dalvikvm: GC_FOR_ALLOC 释放 55K,18% 释放 27700K/33472K,暂停 14ms,总共 14ms12-16 20:13:45.004 2778-2778/com.spekz I/dalvikvm-heap:为 3214096 字节分配将堆(碎片情况)增加到 33.606MB12-16 20:13:45.064 2778-2778/com.spekz D/MoPub:无法检索 GPS 位置:访问似乎已被禁用.12-16 20:13:45.064 2778-2778/com.spekz D/MoPub:加载网址:http://ads.mopub.com/m/ad?v=6&id=47b3246cf9604036bfb1837d193d15d9&nv=3.3.0%2Bkit&dn=samsung%2CSM-G900F%2Ckltexx&udid=ifa%3A56d9b230-e477-4a7d-904a-5bf30f1ea0e1&z=%2B0100&o=p&sc_a=3.0&mr=1&mcc=219&mnc=10&iso=hr&cn=HR%20VIP&ct=2&av=1.0&android_perms_ext_storage=1&ts=112-16 20:13:45.064 2778-2778/com.spekz I/MoPub: 为任务 #0 获取广告12-16 20:13:45.064 2778-2778/com.spekz I/com.mopub: 为任务#0获取广告12-16 20:13:45.364 2778-3261/com.spekz D/MoPub:加载广告类型:admob_native12-16 20:13:45.374 2778-3261/com.spekz I/System.out: AsyncTask #4 调用 detatch()12-16 20:13:45.374 2778-2778/com.spekz D/MoPub: 加载自定义事件适配器.12-16 20:13:45.374 2778-2778/com.spekz D/MoPub:尝试调用自定义事件:com.mopub.mobileads.GooglePlayServicesBanner12-16 20:13:45.374 2778-2778/com.spekz D/MoPub:无法定位或实例化自定义事件:com.mopub.mobileads.GooglePlayServicesBanner.12-16 20:13:45.374 2778-2778/com.spekz V/MoPub: MoPubErrorCode: 找不到本机网络或自定义事件适配器.12-16 20:13:45.374 2778-2778/com.spekz D/MoPub:加载故障转移网址:http://ads.mopub.com/m/ad?v=6&id=47b3246cf9604036bfb1837d193d15d9&nv=3.3.0%2Bkit&dn=samsung%2CSM-G900F%2Ckltexx&udid=ifa%3A56d9b230-e477-4a7d-904a-5bf30f1ea0e1&z=%2B0100&o=p&sc_a=3.0&mr=1&mcc=219&mnc=10&iso=hr&cn=HR%20VIP&ct=2&av=1.0&android_perms_ext_storage=1&ts=1&exclude=9fb97ef474b011e48e2c002590f2bb78&request_id=c9d0e74352be40218b76d719289e12-16 20:13:45.374 2778-2778/com.spekz D/MoPub:加载网址:http://ads.mopub.com/m/ad?v=6&id=47b3246cf9604036bfb1837d193d15d9&nv=3.3.0%2Bkit&dn=samsung%2CSM-G900F%2Ckltexx&udid=ifa%3A56d9b230-e477-4a7d-904a-5bf30f1ea0e1&z=%2B0100&o=p&sc_a=3.0&mr=1&mcc=219&mnc=10&iso=hr&cn=HR%20VIP&ct=2&av=1.0&android_perms_ext_storage=1&ts=1&exclude=9fb97ef474b011e48e2c002590f2bb78&request_id=c9d0e74352be40218b796d719289e12-16 20:13:45.374 2778-2778/com.spekz I/MoPub: 为任务 #1 获取广告12-16 20:13:45.374 2778-2778/com.spekz I/com.mopub: 为任务 #1 获取广告12-16 20:13:45.674 2778-2849/com.spekz D/MoPub:没有找到 adunit (47b3246cf9604036bfb1837d193d15d9) 的广告.12-16 20:13:45.674 2778-2849/com.spekz I/System.out: AsyncTask #3 调用 detatch()12-16 20:13:45.684 2778-2778/com.spekz I/MoPub: 广告加载失败.12-16 20:13:45.684 2778-2778/com.spekz I/com.mopub: 广告加载失败.12-16 20:14:45.354 2778-2778/com.spekz D/MoPub:为广告单元禁用刷新 (47b3246cf9604036bfb1837d193d15d9).

该应用程序不在任何商店,我只是在手机上测试它.这有什么区别吗?非常感谢任何帮助:)

解决方案

上面写着:

<块引用>

12-16 20:13:45.374 2778-2778/com.spekz D/MoPub﹕无法定位或实例化自定义事件:com.mopub.mobileads.GooglePlayServicesBanner.

这意味着您可能尚未集成适配器,或者 MoPub SDK 访问此文件时出现问题.适配器位于 Android 主 SDK 中:https://github.com/mopub/mopub-android-sdk/tree/master/extras/src/com/mopub/mobileads

AdMob 适配器和对应的 AdMob SDK 的集成步骤请参考第三方网络集成文档(使用最新版本兼容 iOS8):https://github.com/mopub/mopub-android-sdk/wiki/Integrating-Third-Party-Ad-Networks

您的广告单元上的 AdMob 似乎也未启用.请按照以下步骤在广告单元上启用网络.

<块引用>

  1. 转到 MoPub 用户界面中的网络"标签
  2. 点击细分"
  3. 点击您要设置的指定段(注:帐户将在创建时自动设置全局段.这个会是大多数人需要导航到设置广告的部分特定广告单元的网络.如果一个新的段是,这会改变已创建并具有特定定位,因为新细分将覆盖Global Segment 的具体参数.)
  4. 有一个过滤器设置为仅显示正在运行的广告来源.你想要关闭过滤器内显示状态:正在运行"的选项卡框以查看其余的广告来源.
  5. 点击您要更改的广告单元的下拉菜单
  6. 修改广告来源的 ecpm
  7. 点击设置"

这将为该特定广告单元启用广告网络.

https://twittercommunity.com/t/i-created-a-new-ad-unit-but-cant-target-my-ad-network-to-it-how-do-i-do-so/6927/2

希望这有帮助!

I've been trying to get ads running on my app for a couple of days now. I have everything setup, line item, banner, admob ID (the one with ca-app....), I got the right mopub Id and everything. However I still get this message:

12-16 20:13:44.984    2778-2778/com.spekz D/skia﹕ GFXPNG PNG bitmap created       width:720 height:279 bitmap id is 184
12-16 20:13:44.994    2778-2778/com.spekz D/dalvikvm﹕ GC_FOR_ALLOC freed 55K, 18% free 27700K/33472K, paused 14ms, total 14ms
12-16 20:13:45.004    2778-2778/com.spekz I/dalvikvm-heap﹕ Grow heap (frag case) to 33.606MB for 3214096-byte allocation
12-16 20:13:45.064    2778-2778/com.spekz D/MoPub﹕ Failed to retrieve GPS location: access appears to be disabled.
12-16 20:13:45.064    2778-2778/com.spekz D/MoPub﹕ Loading url:   http://ads.mopub.com/m/ad?v=6&id=47b3246cf9604036bfb1837d193d15d9&nv=3.3.0%2Bkit&dn=samsung%2CSM-G900F%2Ckltexx&udid=ifa%3A56d9b230-e477-4a7d-904a-5bf30f1ea0e1&z=%2B0100&o=p&sc_a=3.0&mr=1&mcc=219&mnc=10&iso=hr&cn=HR%20VIP&ct=2&av=1.0&android_perms_ ext_storage=1&ts=1
12-16 20:13:45.064    2778-2778/com.spekz I/MoPub﹕ Fetching ad for task #0
12-16 20:13:45.064    2778-2778/com.spekz I/com.mopub﹕ Fetching ad for task #0
12-16 20:13:45.364    2778-3261/com.spekz D/MoPub﹕ Loading ad type: admob_native
12-16 20:13:45.374    2778-3261/com.spekz I/System.out﹕ AsyncTask #4 calls detatch()
12-16 20:13:45.374    2778-2778/com.spekz D/MoPub﹕ Loading custom event adapter.
12-16 20:13:45.374    2778-2778/com.spekz D/MoPub﹕ Attempting to invoke custom event: com.mopub.mobileads.GooglePlayServicesBanner
12-16 20:13:45.374    2778-2778/com.spekz D/MoPub﹕ Couldn't locate or instantiate custom event: com.mopub.mobileads.GooglePlayServicesBanner.
12-16 20:13:45.374    2778-2778/com.spekz V/MoPub﹕ MoPubErrorCode: Unable to find Native Network or Custom Event adapter.
12-16 20:13:45.374    2778-2778/com.spekz D/MoPub﹕ Loading failover url: http://ads.mopub.com/m/ad?v=6&id=47b3246cf9604036bfb1837d193d15d9&nv=3.3.0%2Bkit&dn=samsung%2CSM-G900F%2Ckltexx&udid=ifa%3A56d9b230-e477-4a7d-904a-5bf30f1ea0e1&z=%2B0100&o=p&sc_a=3.0&mr=1&mcc=219&mnc=10&iso=hr&cn=HR%20VIP&ct=2&av=1.0&android_perms_ext_storage=1&ts=1&exclude=9fb97ef474b011e48e2c002590f2bb78&request_id=c9d0e74352be40218b76d719289e4c09&fail=1
12-16 20:13:45.374    2778-2778/com.spekz D/MoPub﹕ Loading url: http://ads.mopub.com/m/ad?v=6&id=47b3246cf9604036bfb1837d193d15d9&nv=3.3.0%2Bkit&dn=samsung%2CSM-G900F%2Ckltexx&udid=ifa%3A56d9b230-e477-4a7d-904a-5bf30f1ea0e1&z=%2B0100&o=p&sc_a=3.0&mr=1&mcc=219&mnc=10&iso=hr&cn=HR%20VIP&ct=2&av=1.0&android_perms_ext_storage=1&ts=1&exclude=9fb97ef474b011e48e2c002590f2bb78&request_id=c9d0e74352be40218b76d719289e4c09&fail=1
12-16 20:13:45.374    2778-2778/com.spekz I/MoPub﹕ Fetching ad for task #1
12-16 20:13:45.374    2778-2778/com.spekz I/com.mopub﹕ Fetching ad for task #1
12-16 20:13:45.674    2778-2849/com.spekz D/MoPub﹕ No ads found for adunit (47b3246cf9604036bfb1837d193d15d9).
12-16 20:13:45.674    2778-2849/com.spekz I/System.out﹕ AsyncTask #3 calls detatch()
12-16 20:13:45.684    2778-2778/com.spekz I/MoPub﹕ Ad failed to load.
12-16 20:13:45.684    2778-2778/com.spekz I/com.mopub﹕ Ad failed to load.
12-16 20:14:45.354    2778-2778/com.spekz D/MoPub﹕ Refresh disabled for ad unit (47b3246cf9604036bfb1837d193d15d9).

The app is not on any store, I am simply testing it on my phone. Does this make any difference? Any help is greatly appreciated :)

解决方案

It says:

12-16 20:13:45.374 2778-2778/com.spekz D/MoPub﹕ Couldn't locate or instantiate custom event: com.mopub.mobileads.GooglePlayServicesBanner.

This means it is likely that you have not integrated the adapter or there is an issue with the MoPub SDK accessing this file. The adapter is located here in the Android master SDK: https://github.com/mopub/mopub-android-sdk/tree/master/extras/src/com/mopub/mobileads

Please reference the third party network integration documentation on steps to integrate the AdMob adapter and the corresponding AdMob SDK (use the latest version to be iOS8 compatible): https://github.com/mopub/mopub-android-sdk/wiki/Integrating-Third-Party-Ad-Networks

It also seems that AdMob is not active on your ad unit. Please follow these steps to enable a network on an ad unit.

  1. Go to the "Networks" tab in the MoPub UI
  2. Click "Segments"
  3. Click the specified segment you want to set (Note: Accounts will automatically be set with a Global Segment on creation. This would be the segment most people would need to navigate to to set the ad network for the specific ad unit. This changes if a new segment is created and has specific targeting as new segments will override the Global Segment for their specific parameters.)
  4. There is a filter set to show only running ad sources. You want to close the tab for this that says "Status:Running" inside the filter box to see the rest of the ad sources.
  5. Click the drop down for the ad unit you want to change
  6. Edit the ecpm of the ad source
  7. Click "Set"

This will enable the ad network for that specific ad unit.

https://twittercommunity.com/t/i-created-a-new-ad-unit-but-cant-target-my-ad-network-to-it-how-do-i-do-so/6927/2

Hope this helped!

这篇关于无法使用 mopub 从 admob 获取广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)