问题描述
我用admob构建了一个Flutter应用程序。在仿真器中,原生广告可以正常工作,但是,当我尝试在真实设备上对其进行测试时,该广告不会显示。我该怎么做才能解决此问题?
这是我的代码:-
class _HomePageState extends State<HomePage> {
static const adUnitID = "ca-app-pub-4691353582149409/1387330251";
final _nativeAdController = NativeAdmobController();
@override
Widget build(BuildContext context) {
return Scaffold
(
body: Column
(
children: <Widget>
[
Container(
height: 90,padding: EdgeInsets.all(10),margin: EdgeInsets.only(bottom: 20.0),child: NativeAdmob(
// Your ad unit id
adUnitID: adUnitID,numberAds: 3,controller: _nativeAdController,type: NativeAdmobType.banner,),}
这也给我一些有关Google应用ID的怪异错误。进一步来说: GoogleService无法初始化,状态:10,名称为google_app_id的字符串资源中缺少google app id值
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)