NativeScript / NativeScript/plugins

admob and vanilla js for Android

未关闭
#631 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
206
派生
123
平均合并
2 天 1 小时
30 天内合并 PR
1

描述

I've been trying to add ADMOB to a test app for several days without success. Steps I've taken:

  1. Add "@nativescript/google-mobile-ads": "^5.0.3"

  2. In AndroidManifest.xml (./App_Resources/Android/src/main) add

<application..> ...
<meta-data  
android:name="com.google.android.gms.ads.APPLICATION_ID"   
android:value="ca-app-pub-3940256099942544~3347511713" />
...
</application>
  1. in the app.js add
import { Application } from '@nativescript/core';
import { MobileAds } from '@nativescript/google-mobile-ads';

console.log("🔥 Inicializando Google Mobile Ads...");
MobileAds.init();

Application.run({ moduleName: 'main-page' });

Then "ns run android"

So far, I haven't been able to get it working.

Other data:
ns --version 8.9.2
windows 10 and vscode
Mi repo https://github.com/germandeburzaco/testMonetizarApp

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用 issue 中显示的 app.js、AndroidManifest.xml 路径以及 @nativescript/google-mobile-ads 包版本,通过 ns run android 重现该设置。捕获缺失的构建或运行时错误,并将测试应用的配置与插件文档中的 Android 设置进行比较。当测试应用成功初始化 MobileAds 并显示预期的 AdMob 行为时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, javascript, typescript
领域
mobile-dev
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。