首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在whatsapp贴纸应用上实施admob

在whatsapp贴纸应用上实施admob
EN

Stack Overflow用户
提问于 2018-12-06 00:44:30
回答 1查看 533关注 0票数 0

我会尽我所能做到具体。首先,我是编程新手,我已经创建了完整的whatsapp贴纸应用程序,然后我想放一些广告,赚一些钱等等,我已经搜索了很多谷歌,youtube等,并决定开始这个过程第一次尝试失败的原因未知。第二,第三,第四,应用程序每次都会崩溃

我不知道的是,我是否必须在我的java文件夹上添加一个新的活动,或者使用任何现有的活动

我是否必须为广告创建一个新的布局,或者使用现有的任何人,我正在使用[https://github.com/WhatsApp/stickers]

下面是我的依赖项

代码语言:javascript
复制
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-ads:17.1.2'
implementation 'com.android.support:design:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.facebook.fresco:fresco:1.11.0'
implementation 'com.facebook.fresco:webpsupport:1.11.0'
implementation 'com.facebook.fresco:animated-webp:1.11.0'
implementation 'com.facebook.fresco:webpsupport:1.11.0'

这是我的Gradle.android

代码语言:javascript
复制
buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

我的androidmanifest清单

代码语言:javascript
复制
    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.samplestickerapp">

    <application
        android:allowBackup="false"
        android:fullBackupContent="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:name=".StickerApplication"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:ignore="GoogleAppIndexingWarning">
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="[ca-app-pub-7344222011487890~7694606742]"/>
        <activity android:name=".EntryActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".StickerPackListActivity"
            android:label="@string/title_activity_sticker_packs_list" />
        <activity
            android:name=".StickerPackDetailsActivity"
            android:parentActivityName=".StickerPackListActivity"
            tools:ignore="UnusedAttribute">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.example.samplestickerapp.StickerPackListActivity" />
        </activity>
        <activity
            android:name=".StickerPackInfoActivity"
            android:label="@string/title_activity_sticker_pack_info"
            android:parentActivityName=".StickerPackDetailsActivity"
            tools:ignore="UnusedAttribute">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.example.samplestickerapp.StickerPackDetailsActivity" />
        </activity>

        <provider
            android:name=".StickerContentProvider"
            android:authorities="${contentProviderAuthority}"
            android:enabled="true"
            android:exported="true"
            android:readPermission="com.whatsapp.sticker.READ" />
    </application>
</manifest>

如果你想要更多的信息,请帮助我,我会尽可能的发布

EN

回答 1

Stack Overflow用户

发布于 2018-12-13 16:20:21

代码语言:javascript
复制
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="[ca-app-pub-7344222011487890~7694606742]"/>

Youre supposed to remove those on android:value -> "[..]"
So it'll look like this:

        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-7344222011487890~7694606742"/>

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53636955

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档