[]layaNative打包安卓版,如何添加admob?
layaNative打包安卓版,如何添加admob?
构建好的android studio项目中,找不到activity_main.xml
构建好的android studio项目中,找不到activity_main.xml
没有找到相关结果
已邀请:
要回复问题请先登录
3 个回复
cuixueying
赞同来自:
匿名用户
赞同来自:
setContentView(R.layout.activity_main);
AdView adView = (AdView) findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder() .setRequestAgent("android_studio:ad_template").build(); adView.loadAd(adRequest);
//admob官方例子是R.layout.activity_main里面有个R.id.adView
laya构建项目里面是
View gameView = mPlugin.game_plugin_get_view();
this.setContentView(gameView);
Laya_XS
赞同来自: