【问题标题】:How to add Mopub ads in android studio如何在 android studio 中添加 Mopub 广告
【发布时间】:2020-08-27 21:48:12
【问题描述】:

您好,我已经尝试了所有方法。但我失败了,如果有人可以解决我的问题,请帮助我。 我想在 android studio 中集成 Mopub 广告。 我已经尝试过这个(https://developers.mopub.com/publishers/android/integrate/#option-3-cloned-github-repository),但不知道我是怎么出错的。

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

我的 build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        jcenter()
        google()
        maven { url "https://s3.amazonaws.com/moat-sdk-builds" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.3'
        classpath 'com.google.gms:google-services:4.3.3'
        implementation('com.mopub:mopub-sdk:@aar') {
            transitive = true
        }
        // NOTE: Do not place your application dependencies here; they belon
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        google()

    }
}

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

【问题讨论】:

    标签: android firebase android-studio mopub


    【解决方案1】:

    implementation('com.mopub:mopub-sdk:5.13.1@aar') 进入您的应用(不是项目)build.gradle

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多