Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

开屏广告加载失败 #134

Open
FelixZ88 opened this issue Nov 14, 2024 · 4 comments
Open

开屏广告加载失败 #134

FelixZ88 opened this issue Nov 14, 2024 · 4 comments

Comments

@FelixZ88
Copy link

描述

异常/需求具体描述
2
E/ignored (28126): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
E/SplashAdView(28126): reason: 234 message: 没有合适的广告返回而导致的请求没有填充,偶尔出现属于正常情况。如果出现情况较多或者必现的话,请先检查一下广告尺寸是否填写正确,是否有使用模拟器测试广告,单个设备是否一天请求了大量广告但没有展示或者展示数极低等。排查以上问题依然没有结论,可以在穿山甲媒体平台上对设备进行自助加白解决,路径“接入与测试”->“测试工具”填写相关信息,提交即可完成加白,加白生效时间30分钟左右,关于20001的详解,请参考https://www.csjplatform.com/supportcenter/5421
I/flutter (28126): 开屏广告失败 reason: 234 message: 没有合适的广告返回而导致的请求没有填充,偶尔出现属于正常情况。如果出现情况较多或者必现的话,请先检查一下广告尺寸是否填写正确,是否有使用模拟器测试广告,单个设备是否一天请求了大量广告但没有展示或者展示数极低等。排查以上问题依然没有结论,可以在穿山甲媒体平台上对设备进行自助加白解决,路径“接入与测试”->“测试工具”填写相关信息,提交即可完成加白,加白生效时间30分钟左右,关于20001的详解,请参考https://www.csjplatform.com/supportcenter/5421

设备版本

Flutter 3.24.3

插件版本

插件版本号

日志

详细的log日志或者截图录屏

[GETX] Instance "AdStore" has been created
I/TMe     (28126): init csjm true
I/TMe     (28126): init csjm already
D/_tt_ad_sdk_(28126): init sdk success
E/初始化(28126): 成功
[GETX] Instance "AdStore" has been initialized
I/TeaLog  (28126): s worked:true 60000
I/TTMediationSDK(28126): --==-- v3: 6
D/TrafficStats(28126): tagSocket(5) with statsTag=0xffffffff, statsUid=-1
[GoRouter] getting location for name: "/ad"
[GoRouter] pushing /ad
I/flutter (28126): sdk初始化 true
D/_tt_ad_sdk_(28126): load ad slot type: 3
I/TTMediationSDK(28126): CSJM_loadAD Type:3
I/TMe     (28126): load csj splash 代码位 = 890286135
I/PlatformViewsController(28126): Hosting view in view hierarchy for platform view: 0
I/PlatformViewsController(28126): PlatformView is using SurfaceProducer backend
E/FrameEvents(28126): updateAcquireFence: Did not find frame.
W/Parcel  (28126): Expecting binder but got null!
W/OnBackInvokedCallback(28126): OnBackInvokedCallback is not enabled for the application.
W/OnBackInvokedCallback(28126): Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
E/FrameEvents(28126): updateAcquireFence: Did not find frame.
W/Parcel  (28126): Expecting binder but got null!
E/ignored (28126): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
E/ignored (28126): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
E/SplashAdView(28126): reason: 234  message: 没有合适的广告返回而导致的请求没有填充,偶尔出现属于正常情况。如果出现情况较多或者必现的话,请先检查一下广告尺寸是否填写正确,是否有使用模拟器测试广告,单个设备是否一天请求了大量广告但没有展示或者展示数极低等。排查以上问题依然没有结论,可以在穿山甲媒体平台上对设备进行自助加白解决,路径“接入与测试”->“测试工具”填写相关信息,提交即可完成加白,加白生效时间30分钟左右,关于20001的详解,请参考https://www.csjplatform.com/supportcenter/5421
I/flutter (28126): 开屏广告失败 reason: 234  message: 没有合适的广告返回而导致的请求没有填充,偶尔出现属于正常情况。如果出现情况较多或者必现的话,请先检查一下广告尺寸是否填写正确,是否有使用模拟器测试广告,单个设备是否一天请求了大量广告但没有展示或者展示数极低等。排查以上问题依然没有结论,可以在穿山甲媒体平台上对设备进行自助加白解决,路径“接入与测试”->“测试工具”填写相关信息,提交即可完成加白,加白生效时间30分钟左右,关于20001的详解,请参考https://www.csjplatform.com/supportcenter/5421
E/FrameEvents(28126): updateAcquireFence: Did not find frame.
E/ignored (28126): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
I/TeaLog  (28126): s worked:true 60000
E/ignored (28126): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
I/TeaLog  (28126): s worked:true 60000
Reloaded 1 of 2508 libraries in 2,022ms (compile: 90 ms, reload: 448 ms, reassemble: 1294 ms).
I/TeaLog  (28126): s worked:true 60000
Reloaded 1 of 2508 libraries in 1,878ms (compile: 30 ms, reload: 435 ms, reassemble: 1286 ms).
Reloaded 1 of 2508 libraries in 1,509ms (compile: 32 ms, reload: 468 ms, reassemble: 868 ms).
I/TeaLog  (28126): s worked:true 60000
I/TeaLog  (28126): s worked:true 60000
I/ConnectionPool(28126): cleanup:
I/TeaLog  (28126): s worked:true 60000
I/ConnectionPool(28126): cleanup:

@gstory0404
Copy link
Owner

初始化时useMediation是true吗

@FelixZ88
Copy link
Author

初始化时useMediation是true吗

是true。

class AdStore extends GetxController {
static AdStore get to => Get.find();

bool? _init;
String? _version;
StreamSubscription? _adViewStream;

int _themeStatus = FlutterUnionAdTheme.NIGHT;

bool isInited = false;

@OverRide
void onInit() async {
if (PrivacyStore.to.isPrivacyAgreed()) {
_initRegister();
_register();
isInited = true;
}
super.onInit();
}

///初始化
Future _register() async {
_adViewStream = FlutterUnionadStream.initAdStream(
flutterUnionadFullVideoCallBack: FlutterUnionadFullVideoCallBack(
onShow: () {
print("全屏广告显示");
},
onSkip: () {
print("全屏广告跳过");
},
onClick: () {
print("全屏广告点击");
},
onFinish: () {
print("全屏广告结束");
},
onFail: (error) {
print("全屏广告错误 $error");
},
onClose: () {
print("全屏广告关闭");
},
),
);
}

//注册
void _initRegister() async {
_init = await FlutterUnionad.register(
//穿山甲广告 Android appid 必填
androidAppId: "5619413",
//穿山甲广告 ios appid 必填
iosAppId: "5619413",
//appname 必填
appName: "掐准记账",
//使用聚合功能一定要打开此开关,否则不会请求聚合广告,默认这个值为false
//true使用GroMore下的广告位
//false使用广告变现下的广告位
useMediation: true,
//是否为计费用户 选填
paid: false,
//用户画像的关键词列表 选填
keywords: "",
//是否允许sdk展示通知栏提示 选填
allowShowNotify: true,
//是否显示debug日志
debug: true,
//是否支持多进程 选填
supportMultiProcess: false,
//主题模式 默认FlutterUnionAdTheme.DAY,修改后需重新调用初始化
themeStatus: _themeStatus,
//允许直接下载的网络状态集合 选填
directDownloadNetworkType: [
FlutterUnionadNetCode.NETWORK_STATE_2G,
FlutterUnionadNetCode.NETWORK_STATE_3G,
FlutterUnionadNetCode.NETWORK_STATE_4G,
FlutterUnionadNetCode.NETWORK_STATE_WIFI
],
androidPrivacy: AndroidPrivacy(
//是否允许SDK主动使用地理位置信息 true可以获取,false禁止获取。默认为true
isCanUseLocation: false,
//当isCanUseLocation=false时,可传入地理位置信息,穿山甲sdk使用您传入的地理位置信息lat
lat: 0.0,
//当isCanUseLocation=false时,可传入地理位置信息,穿山甲sdk使用您传入的地理位置信息lon
lon: 0.0,
// 是否允许SDK主动使用手机硬件参数,如:imei
isCanUsePhoneState: false,
//当isCanUsePhoneState=false时,可传入imei信息,穿山甲sdk使用您传入的imei信息
imei: "",
// 是否允许SDK主动使用ACCESS_WIFI_STATE权限
isCanUseWifiState: false,
// 当isCanUseWifiState=false时,可传入Mac地址信息
macAddress: "",
// 是否允许SDK主动使用WRITE_EXTERNAL_STORAGE权限
isCanUseWriteExternal: false,
// 开发者可以传入oaid
oaid: "b69cd3cf68900323",
// 是否允许SDK主动获取设备上应用安装列表的采集权限
alist: false,
// 是否能获取android ID
isCanUseAndroidId: false,
// 开发者可以传入android ID
androidId: "",
// 是否允许SDK在申明和授权了的情况下使用录音权限
isCanUsePermissionRecordAudio: false,
// 是否限制个性化推荐接口
isLimitPersonalAds: false,
// 是否启用程序化广告推荐 true启用 false不启用
isProgrammaticRecommend: false,
),
iosPrivacy: IOSPrivacy(
//允许个性化广告
limitPersonalAds: false,
//允许程序化广告
limitProgrammaticAds: false,
//允许CAID
forbiddenCAID: false,
));
print("sdk初始化 $_init");
_version = await FlutterUnionad.getSDKVersion();
_themeStatus = await FlutterUnionad.getThemeStatus();
}
}

@FelixZ88
Copy link
Author

是不是我的codeId错了?应该是1开头的吗?

FlutterUnionadSplashAdView(
//android 开屏广告广告id 必填 889033013 102729400
androidCodeId: "890286135",
//ios 开屏广告广告id 必填
iosCodeId: "890286135",

@gstory0404
Copy link
Owner

@FelixZ88 是不是gromore广告位

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants