gstory0404 / flutter_tencentad

腾讯优量汇(广点通)广告 Flutter版本
Apache License 2.0
48 stars 15 forks source link

报错com.qq.e.comm.managers.plugin.e: Fail to init GDTADPLugin,PluginClassLoader == null; 真机运行(小米K60至尊版) #30

Open dalingng opened 2 months ago

dalingng commented 2 months ago

I/flutter (31037): 权限同意 I/flutter (31037): ===============tencent================== E/gdt_ad_mob(31037): Fail to init GDTADPLugin,PluginClassLoader == null;while loading factory impl for:interface com.qq.e.comm.pi.POFactory E/gdt_ad_mob(31037): com.qq.e.comm.managers.plugin.e: Fail to init GDTADPLugin,PluginClassLoader == null;while loading factory impl for:interface com.qq.e.comm.pi.POFactory E/gdt_ad_mob(31037): at com.qq.e.comm.managers.plugin.PM.getFactory(:4) E/gdt_ad_mob(31037): at com.qq.e.comm.managers.plugin.PM.getPOFactory(Unknown Source:11) E/gdt_ad_mob(31037): at com.qq.e.comm.managers.a$a.run(Unknown Source:7) E/gdt_ad_mob(31037): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487) E/gdt_ad_mob(31037): at java.util.concurrent.FutureTask.run(FutureTask.java:264) E/gdt_ad_mob(31037): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) E/gdt_ad_mob(31037): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) E/gdt_ad_mob(31037): at java.lang.Thread.run(Thread.java:1012)

gstory0404 commented 2 months ago
flutter_tencentad:
  git:
     url: https://github.com/gstory0404/flutter_tencentad.git
     ref: 01c3ad346c7718a9a12b8fad6c3d4c5deaf5be3f

引入git版本试一下

dalingng commented 2 months ago
flutter_tencentad:
  git:
     url: https://github.com/gstory0404/flutter_tencentad.git
     ref: 01c3ad346c7718a9a12b8fad6c3d4c5deaf5be3f

引入git版本试一下

谢谢作者的响应

现在不报pluginClassLoader的错误了,但是广告没有显示

有一个错误 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference

I/flutter (20998): ==========AdPlatform.tencent=============
I/PlatformViewsController(20998): Hosting view in view hierarchy for platform view: 10
I/PlatformViewsController(20998): PlatformView is using SurfaceProducer backend
E/BannerAdView(20998): 广告释放
D/BufferQueueConsumer(20998): [ImageReader-1220x203f22m5-20998-33](id:520600000027,api:0,p:-1,c:20998) disconnect
D/BufferQueueConsumer(20998): [](id:520600000028,api:0,p:-1,c:20998) connect: controlledByApp=true
D/Surface (20998): lockHardwareCanvas
D/OpenGLRenderer(20998): makeCurrent grContext:0xb40000710eedbbc0 reset mTextureAvailable
E/FrameEvents(20998): updateAcquireFence: Did not find frame.
D/Surface (20998): lockHardwareCanvas
E/FrameEvents(20998): updateAcquireFence: Did not find frame.
E/TTMediationSDK(20998): TTMediationSDK_102985661_server bidding网络请求响返回.............
E/TTMediationSDK(20998): TTMediationSDK_102985661_server bidding网络请求响应成功......:winners : { [ AdnName:pangle,slotId:958797801,loadSort:0,showSort:-99] }
E/TTMediationSDK(20998): TTMediationSDK_102985661_server bidding网络请求响应成功......server bidding物料......
I/TTMediationSDK(20998): TTMediationSDK_102985661_cancel wfRequestAfExchange with LabelValueAuto !!!
E/TTMediationSDK(20998): TTMediationSDK_102985661_已经响应的广告: 958797800  没有在severBidding的waterFall列表中,需要被移除掉
E/TTMediationSDK(20998): TTMediationSDK_102985661_已经响应的广告被serverBidding过滤完还剩: 0
E/TTMediationSDK(20998): TTMediationSDK_102985661_serverBidding响应回来..........开始从头开始请求waterFallConfig 
E/TTMediationSDK(20998): TTMediationSDK_102985661_层操作......开始执行index:0   层数:0  的config配置............
E/TTMediationSDK(20998): TTMediationSDK_102985661_层操作......开始执行serverBidding层广告............hasServerBidding: true

E/TTMediationSDK(20998): TTMediationSDK_102985661_开始 某一层级的waterFallConfig请求 WaterFallConfig:WaterFallConfig{mAdnetworkName='pangle', mCustomAdnetworkName='null', mAdnetwokrSlotId='958797801', mExchangeRate=1, mSlotEcpm=0.00000, mAdnetworkSlotType=2, mLoadSort=0, mShowSort=-99}
I/TTMediationSDK(20998): TTMediationSDK_102985661_request_AdNetWorkName[pangle] AdUnitId[958797801] + AdType[Banner] 开始adn请求
E/TTMediationSDK(20998): TTMediationSDK_102985661_层操作......ServerBidding ,普通广告同时发起请求............
I/Zeus/receiver_pangle(20998): ZeusTransformUtils-registerReceiver-execute[4 params]
E/webviewpool(20998): ===useJsb2 webView hashCode:266390722
I/TTMediationSDK(20998): TTMediationSDK_102985661_fill_AdNetWorkName[pangle] AdUnitId[958797801] AdType[Banner] 请求成功 (loadSort=0,showSort=-99)
E/flutter_tencentad_BannerAdView(20998): ---onADReceive---BannerAdView  Banner广告加载成功回调
I/TTMediationSDK(20998): TTMediationSDK_102985661_所有层级和所有waterfall都已完成直接回调...
E/TTMediationSDK(20998): TTMediationSDK_102985661_ load done..........s:false  f:false     p.size0   bidding.size:1   normal.size:0
I/TTMediationSDK(20998): TTMediationSDK_102985661_cancel wfRequestAfExchange with LabelValueAuto !!!
E/TTMediationSDK(20998): TTMediationSDK_102985661_广告加载成功!给外部回调:invokeAdLoadCallbackOnMainUI........P.size:0   bidding.size:1   normal.size:0
I/flutter (20998): onShow ====  {width: 0.5, height: 0.5}
D/Surface (20998): lockHardwareCanvas
I/flutter (20998): Banner广告显示
E/FrameEvents(20998): updateAcquireFence: Did not find frame.
E/BannerAdView(20998): 广告拉取成功 1
E/BannerAdView(20998): 信息流广告 ecpm: 
E/BannerAdView(20998): SdkName: null,
E/BannerAdView(20998): CustomSdkName: null,
E/BannerAdView(20998): SlotId: null,
E/BannerAdView(20998): Ecpm: null,
E/BannerAdView(20998): ReqBiddingType: 0,
E/BannerAdView(20998): ErrorMsg: null,
E/BannerAdView(20998): RequestId: null,
E/BannerAdView(20998): RitType: null,
E/BannerAdView(20998): AbTestId: null,
E/BannerAdView(20998): ScenarioId: null,
E/BannerAdView(20998): SegmentId: null,
E/BannerAdView(20998): Channel: null,
E/BannerAdView(20998): SubChannel: null,

E/BannerAdView(20998): customData: null
I/TTMediationSDK(20998): pangle banner : activity = com.bytedance.pangle.wrapper.PluginActivityWrapper@63c9d67 pluginDislikeInteractionCallback:com.bytedance.sdk.openadsdk.pm.k.wo.k.k@b01d63c
E/gdt_ad_mob(20998): ADEvent 参数为空,type:109
D/Surface (20998): lockHardwareCanvas
E/FrameEvents(20998): updateAcquireFence: Did not find frame.
I/chromium(20998): [INFO:CONSOLE(0)] "Mixed Content: The page at 'https://sf3-fe-tos.pglstatp-toutiao.com/obj/ad-pattern/renderer/0b9824/index.html' was loaded over HTTPS, but requested an insecure image 'http://p3-be-pack-sign.pglstatp-toutiao.com/arthur/202406095d0d0395b215a78e4de09b3e~tplv-qgppglrh0x-noop.webp?lk3s=93179448&x-expires=1942272000&x-signature=jGdKQWqJxnBLsZ0Z%2FQvXcR8XEXo%3D'. This content should also be served over HTTPS.", source: https://sf3-fe-tos.pglstatp-toutiao.com/obj/ad-pattern/renderer/0b9824/index.html (0)
I/chromium(20998): [INFO:CONSOLE(0)] "Mixed Content: The page at 'https://sf3-fe-tos.pglstatp-toutiao.com/obj/ad-pattern/renderer/0b9824/index.html' was loaded over HTTPS, but requested an insecure image 'http://p3-be-pack-sign.pglstatp-toutiao.com/web.business.image/a65095efca861131264285a86446351a~tplv-qgppglrh0x-noop.image?lk3s=93179448&x-expires=1942272000&x-signature=UNaTPyl08LfsBmv2rzgZkI3vK64%3D'. This content should also be served over HTTPS.", source: https://sf3-fe-tos.pglstatp-toutiao.com/obj/ad-pattern/renderer/0b9824/index.html (0)
E/TTMediationSDK_banner(20998): TTMediationSDK_102985661_958797801_TTBannerView onRenderSuccess 渲染成功!!mBannerViewRef = java.lang.ref.SoftReference@1b65d58
W/Looper  (20998): PerfMonitor longMsg : seq=51 plan=18:55:45.230 late=0ms wall=8079ms h=android.os.Handler w=1 procState=-1
D/TrafficStats(20998): tagSocket(173) with statsTag=0xffffffff, statsUid=-1
E/ignored (20998): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
E/flutter_tencentad_BannerAdView(20998): ---onADReceive---BannerAdView  Banner广告加载成功回调
I/flutter (20998): onShow ====  {width: 1.1666667461395264, height: 0.5}
I/flutter (20998): Banner广告显示
D/Surface (20998): lockHardwareCanvas
E/FrameEvents(20998): updateAcquireFence: Did not find frame.
E/gdt_ad_mob(20998): ADEvent 参数为空,type:109
D/Surface (20998): lockHardwareCanvas
E/FrameEvents(20998): updateAcquireFence: Did not find frame.
E/flutter_tencentad_BannerAdView(20998): ---onADExposure---BannerAdView  Banner广告曝光
I/flutter (20998): onExpose ====  
D/TrafficStats(20998): tagSocket(389) with statsTag=0xffffffff, statsUid=-1
I/flutter (20998): Banner广告曝光
I/TeaLog  (20998): s worked:true 60000
I/com.sunqi.zm(20998): This is non sticky GC, maxfree is 33554432 minfree is 8388608
I/pwIrisCR(20998): YYY2-2 CoreContext[0xb400007081d47a80]:: Destruct: ##PID##:20998
E/flutter_tencentad_BannerAdView(20998): ---onADReceive---BannerAdView  Banner广告加载成功回调
I/flutter (20998): onShow ====  {width: 1.8333333730697632, height: 0.8333333730697632}
I/flutter (20998): Banner广告显示
D/Surface (20998): lockHardwareCanvas
E/FrameEvents(20998): updateAcquireFence: Did not find frame.
E/gdt_ad_mob(20998): ADEvent 参数为空,type:109
D/Surface (20998): lockHardwareCanvas
E/FrameEvents(20998): updateAcquireFence: Did not find frame.
E/flutter_tencentad_BannerAdView(20998): ---onADExposure---BannerAdView  Banner广告曝光
I/flutter (20998): onExpose ====  
I/flutter (20998): Banner广告曝光
D/TrafficStats(20998): tagSocket(258) with statsTag=0xffffffff, statsUid=-1
D/TrafficStats(20998): tagSocket(196) with statsTag=0xffffffff, statsUid=-1
E/ignored (20998): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
dalingng commented 2 months ago

onShow这个尺寸不对,我给的是460宽的这里打印的好像不对的吧。

{width: 1.1666667461395264, height: 0.5}


E/flutter_tencentad_BannerAdView(31700): ---onADReceive---BannerAdView  Banner广告加载成功回调
I/flutter (31700): onShow ====  {width: 1.1666667461395264, height: 0.5}
I/flutter (31700): Banner广告显示
D/Surface (31700): lockHardwareCanvas
E/FrameEvents(31700): updateAcquireFence: Did not find frame.
E/gdt_ad_mob(31700): ADEvent 参数为空,type:109
D/Surface (31700): lockHardwareCanvas
E/FrameEvents(31700): updateAcquireFence: Did not find frame.
E/flutter_tencentad_BannerAdView(31700): ---onADExposure---BannerAdView  Banner广告曝光
I/flutter (31700): onExpose ====  
I/flutter (31700): Banner广告曝光
D/TrafficStats(31700): tagSocket(375) with statsTag=0xffffffff, statsUid=-1
gstory0404 commented 2 months ago

banner宽高比应该为6.4:1

flutter_tencentad:
  git:
     url: https://github.com/gstory0404/flutter_tencentad.git
     ref: 17e56955d4ba220523d6a9c1b32871b1b83b6f77

试下

dalingng commented 2 months ago

banner宽高比应该为6.4:1

flutter_tencentad:
  git:
     url: https://github.com/gstory0404/flutter_tencentad.git
     ref: 17e56955d4ba220523d6a9c1b32871b1b83b6f77

试下

banner可以了。 激励视频不行-_-||

是不是更新的sdk就不行了

I/flutter (24064): ==========AdPlatform.tencent=============
I/flutter (24064): ==========================true
E/MethodChannel#flutter_tencentad(24064): Failed to handle method call
E/MethodChannel#flutter_tencentad(24064): java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Boolean
E/MethodChannel#flutter_tencentad(24064):   at com.gstory.flutter_tencentad.rewardvideoad.RewardVideoAd.showAd(RewardVideoAd.kt:67)
E/MethodChannel#flutter_tencentad(24064):   at com.gstory.flutter_tencentad.FlutterTencentadPlugin.onMethodCall(FlutterTencentadPlugin.kt:93)
E/MethodChannel#flutter_tencentad(24064):   at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#flutter_tencentad(24064):   at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#flutter_tencentad(24064):   at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#flutter_tencentad(24064):   at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#flutter_tencentad(24064):   at android.os.Handler.handleCallback(Handler.java:958)
E/MethodChannel#flutter_tencentad(24064):   at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#flutter_tencentad(24064):   at android.os.Looper.loopOnce(Looper.java:222)
E/MethodChannel#flutter_tencentad(24064):   at android.os.Looper.loop(Looper.java:314)
E/MethodChannel#flutter_tencentad(24064):   at android.app.ActivityThread.main(ActivityThread.java:8602)
E/MethodChannel#flutter_tencentad(24064):   at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_tencentad(24064):   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:565)
E/MethodChannel#flutter_tencentad(24064):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
D/TrafficStats(24064): tagSocket(218) with statsTag=0xffffffff, statsUid=-1
D/TrafficStats(24064): tagSocket(298) with statsTag=0xffffffff, statsUid=-1
E/flutter_tencentad_RewardVideoAd(24064): ---onVideoCached---RewardVideoAd  激励广告视频素材缓存成功
E/flutter_tencentad_RewardVideoAd(24064): ---onADLoad---RewardVideoAd  激励广告加载成功
D/TrafficStats(24064): tagSocket(327) with statsTag=0xffffffff, statsUid=-1
D/TrafficStats(24064): tagSocket(350) with statsTag=0xffffffff, statsUid=-1
W/libc    (24064): Access denied finding property "vendor.scroll.fpsgo.release"
gstory0404 commented 2 months ago

因为我这边优量汇的账号有问题,暂时插件还未进行测试 所以新版本尚未发布,方便的话 可以加群私发我一下广告位id协助测试一下

gstory0404 commented 2 months ago

@dalingng 不要开启竞价模式 image

dalingng commented 2 months ago

@dalingng 不要开启竞价模式 image

可以了。有点报错