在Android中设置MoPub广告

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/

这就是我所拥有的

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'   
    }
}

但我也得到错误:

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正在这里?

评论
bipsam
bipsam

Place this dependency in your module-level build.gradle, not project-level.

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