我正在我的应用中实施奖励视频广告。当我尝试加载奖励的视频广告时,每次都会调用onRewardedVideoAdFailedToLoad
方法并在控制台中打印一些错误。这是我的控制台响应。
我成功完成了与Firebase集成的Admob。我在com.google.firebase:firebase-ads:10.2.4
sdk。
05-23 14:24:18.787 671-1492/com.app.adme E/ExoPlayerImplInternal: Internal track renderer error.
com.google.android.gms.ads.exoplayer1.d: com.google.android.gms.ads.exoplayer1.upstream.o: Unable to connect to https://www.youtube.com/get_video?video_id=XfMxh24eBkU&ts=1495528753&t=T1S3FU7_OlRsC59YBvaIxTL7jO8&gad=1
at com.google.android.gms.ads.exoplayer1.q.b(:com.google.android.gms.DynamiteModulesA:253)
at com.google.android.gms.ads.exoplayer1.j.handleMessage(:com.google.android.gms.DynamiteModulesA:2116)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.gms.ads.exoplayer1.util.i.run(:com.google.android.gms.DynamiteModulesA:40)
Caused by: com.google.android.gms.ads.exoplayer1.upstream.o: Unable to connect to https://www.youtube.com/get_video?video_id=XfMxh24eBkU&ts=1495528753&t=T1S3FU7_OlRsC59YBvaIxTL7jO8&gad=1
at com.google.android.gms.ads.exoplayer1.upstream.h.a(:com.google.android.gms.DynamiteModulesA:187)
at com.google.android.gms.ads.exoplayer1.upstream.i.a(:com.google.android.gms.DynamiteModulesA:151)
at com.google.android.gms.ads.internal.overlay.exoplayer1.r.a(:com.google.android.gms.DynamiteModulesA:91)
at com.google.android.gms.ads.exoplayer1.extractor.h.c(:com.google.android.gms.DynamiteModulesA:608)
at com.google.android.gms.ads.exoplayer1.upstream.t.run(:com.google.android.gms.DynamiteModulesA:242)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x6a677eb8: Failure in SSL library, usually a protocol error
error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol (external/openssl/ssl/s23_clnt.c:714 0x5ec5f6fd:0x00000000)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:448)
at com.android.okhttp.Connection.upgradeToTls(Connection.java:146)
at com.android.okhttp.Connection.connect(Connection.java:107)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294)
at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:89)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:161)
at com.google.android.gms.ads.exoplayer1.upstream.h.a(:com.google.android.gms.DynamiteModulesA:1335)
... 9 more
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x6a677eb8: Failure in SSL library, usually a protocol error
error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol (external/openssl/ssl/s23_clnt.c:714 0x5ec5f6fd:0x00000000)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:405)
... 18 more
05-23 14:24:18.787 671-671/com.app.adme W/Ads: ExoPlayer failed during precache: PlayerError Exception: com.google.android.gms.ads.exoplayer1.upstream.o: Unable to connect to https://www.youtube.com/get_video?video_id=XfMxh24eBkU&ts=1495528753&t=T1S3FU7_OlRsC59YBvaIxTL7jO8&gad=1
05-23 14:24:18.789 671-1494/com.app.adme D/dalvikvm: threadid=68: exiting
05-23 14:24:18.790 671-1494/com.app.adme D/dalvikvm: threadid=68: bye!
05-23 14:24:18.842 671-847/com.app.adme W/Ads: Failed to preload url https://www.youtube.com/get_video?video_id=XfMxh24eBkU&ts=1495528753&t=T1S3FU7_OlRsC59YBvaIxTL7jO8&gad=1 Exception: Abort requested before buffering finished.
05-23 14:24:18.843 671-671/com.app.adme D/WebView: evaluateJavascript=(window.AFMA_ReceiveMessage || function() {})('onPrecacheEvent',{"cachedSrc":"cache:5D0F33814476AAC23895899F54683F67","message":"ExoPlayer caching failed. Type: PlayerError","src":"https:\/\/www.youtube.com\/get_video?video_id=XfMxh24eBkU&ts=1495528753&t=T1S3FU7_OlRsC59YBvaIxTL7jO8&gad=1","type":"network","reason":"badUrl","event":"precacheCanceled"});
05-23 14:24:18.874 671-925/com.app.adme D/WebViewCallback: shouldInterceptRequest=https://googleads.g.doubleclick.net/pagead/conversion/?ai=CqS7oMPUjWaapOI2koAPN6bToCPiQ17pJ2tjtq6EF5Kvp5bgBEAEgjbGDN2Dl6uMDoAHkyducA6gDAcgDCKoEhwFP0PiBEO4ptgn27PrV-Vjp80DyHE-drpeKiH7ZE7bfidl_OFjBbQt0SlyYKogFGFIGLh3HuTJp8mqt0yiT0bXklZt-LvCE07yez_QiFam10R6bDWBDYHOih-Oru9Uau9XGfx8s8CWKxODk-Os6uC3162iZ6k0ha_eezdXJtrFrRQO18jKVM8nABNHg68yfAYgF-L3G-QKQBgGgBhywBgGAB4S2pGOYBwGoB6a-G7gH6qPEgs2enaMbwAeL1QPAB-jUA9gHAfoHIWNvbS50YXA0ZnVuLmdhbGF4eWVtcGlyZTJfYW5kcm9pZJgIAaAI_I2pBLAIArgIAdIIBQiAYRABsQlG4q03yjR-ergTsQOCFBsaGW1vYmlsZWFwcDo6Mi1jb20uYXBwLmFkbWU&sigh=AaCPhcw9Wo0&cmd=ChtjYS1hcHAtcHViLTgyNjE2ODYxMTI2NTA2OTQQsQMYAQ&label=videoplayfailed400
05-23 14:24:18.876 671-671/com.app.adme D/WebViewCallback: onLoadResource=https://googleads.g.doubleclick.net/pagead/conversion/?ai=CqS7oMPUjWaapOI2koAPN6bToCPiQ17pJ2tjtq6EF5Kvp5bgBEAEgjbGDN2Dl6uMDoAHkyducA6gDAcgDCKoEhwFP0PiBEO4ptgn27PrV-Vjp80DyHE-drpeKiH7ZE7bfidl_OFjBbQt0SlyYKogFGFIGLh3HuTJp8mqt0yiT0bXklZt-LvCE07yez_QiFam10R6bDWBDYHOih-Oru9Uau9XGfx8s8CWKxODk-Os6uC3162iZ6k0ha_eezdXJtrFrRQO18jKVM8nABNHg68yfAYgF-L3G-QKQBgGgBhywBgGAB4S2pGOYBwGoB6a-G7gH6qPEgs2enaMbwAeL1QPAB-jUA9gHAfoHIWNvbS50YXA0ZnVuLmdhbGF4eWVtcGlyZTJfYW5kcm9pZJgIAaAI_I2pBLAIArgIAdIIBQiAYRABsQlG4q03yjR-ergTsQOCFBsaGW1vYmlsZWFwcDo6Mi1jb20uYXBwLmFkbWU&sigh=AaCPhcw9Wo0&cmd=ChtjYS1hcHAtcHViLTgyNjE2ODYxMTI2NTA2OTQQsQMYAQ&label=videoplayfailed400
05-23 14:24:19.015 671-671/com.app.adme D/WebView: evaluateJavascript=(window.AFMA_ReceiveMessage || function() {})('volume',{"app_volume":"1.0","device_volume":"1.0","app_muted":"false"});
05-23 14:24:19.015 671-671/com.app.adme D/WebView: onPause
05-23 14:24:19.015 671-671/com.app.adme W/Ads: Failed to load ad: 0
05-23 14:24:19.026 671-671/com.app.adme W/Ads: Failed to load ad: 3
05-23 14:24:19.077 671-671/com.app.adme D/GraphicBuffer: create handle(0x6a68ff50) (w:512, h:88, f:1)
05-23 14:24:21.037 671-671/com.app.adme D/GraphicBuffer: close handle(0x6a68ff50) (w:512 h:88 f:1)
05-23 14:24:21.134 671-793/com.app.adme D/libc-netbsd: getaddrinfo: graph.facebook.com get result from proxy >>
05-23 14:24:21.135 671-793/com.app.adme I/System.out: propertyValue:false
05-23 14:24:21.135 671-793/com.app.adme I/System.out: [socket][64] connection graph.facebook.com/31.13.78.13:443;LocalPort=37657(0)
05-23 14:24:21.136 671-793/com.app.adme I/System.out: [CDS]connect[graph.facebook.com/31.13.78.13:443] tm:90
05-23 14:24:21.137 671-793/com.app.adme D/Posix: [Posix_connect Debug]Process com.app.adme :443
05-23 14:24:21.268 671-793/com.app.adme I/System.out: [socket][/10.10.5.7:37657] connected
05-23 14:24:21.268 671-793/com.app.adme I/System.out: [CDS]rx timeout:0
答案 0 :(得分:2)
我有几乎类似的错误
内部曲目渲染器错误。
无法连接到https://www.youtube.com/get_video?video_id=XfMxh24eBkU&ts=1495528753&t=T1S3FU7_OlRsC59YBvaIxTL7jO8&gad=1
无法加载广告:0
无法加载广告:3
我的情况是当我实施10.2.6时,一切都很好。
compileSdkVersion 25
buildToolsVersion '25.0.3'
dependencies {
compile 'com.google.android.gms:play-services-ads:10.2.6'
compile 'com.google.firebase:firebase-core:10.2.6'
compile 'com.google.firebase:firebase-ads:10.2.6'
}
但是当实施11.0.0时,会显示上述错误。
compileSdkVersion 25
buildToolsVersion '25.0.3'
dependencies {
compile 'com.google.android.gms:play-services-ads:11.0.0'
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.google.firebase:firebase-ads:11.0.0'
}
我现在的解决方案是保留10.2.6直到他们有一个修复程序。
使用更新的firebase 11.0.2,测试广告正常工作。
compileSdkVersion 25
buildToolsVersion '25.0.3'
dependencies {
compile 'com.google.android.gms:play-services-ads:11.0.2'
compile 'com.google.firebase:firebase-core:11.0.2'
compile 'com.google.firebase:firebase-ads:11.0.2'
}