简体   繁体   English

在 Android 中设置 MoPub 广告

[英]Setiing up MoPub ads in Android

Basic settings for this ad network doesnt work.此广告网络的基本设置不起作用。 I am not sure what to do.cant wait for their answers from support.我不知道该怎么办。不能等待他们的支持回答。 please take a look.请看一下。 documentation says: https://developers.mopub.com/publishers/android/integrate/文档说: https://developers.mopub.com/publishers/android/integrate/

and here is what i have这就是我所拥有的

buildscript {
    repositories {
        jcenter()
        mavenCentral()
        google()
        maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
        maven { url 'https://maven.google.com' } // necessary for Android API 26
    }
    dependencies {
        implementation('com.mopub:mopub-sdk:5.12.0@aar') {
            transitive = true
        }
        classpath 'com.android.tools.build:gradle:3.6.3'
        classpath 'com.google.gms:google-services:3.0.0'   
    }
}

but i also get error:但我也得到错误:

Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method implementation() for arguments [com.mopub:mopub-sdk:5.12.0@aar, build_ayci204431wkz2i6l6lbd9gbs$_run_closure1$_closure3$_closure6@63eaaa2f] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

WTH is going on here? WTH在这里发生吗?

Place this dependency in your module-level build.gradle , not project-level.将此依赖项放在模块级build.gradle中,而不是项目级。

implementation('com.mopub:mopub-sdk:5.12.0@aar') {
    transitive = true
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM