Java 在Android上设置MoPub广告
此广告网络的基本设置不起作用。我不知道该怎么办。迫不及待地等待他们的支持。请看一看。文件说: 这就是我所拥有的Java 在Android上设置MoPub广告,java,android,android-studio,ads,mopub,Java,Android,Android Studio,Ads,Mopub,此广告网络的基本设置不起作用。我不知道该怎么办。迫不及待地等待他们的支持。请看一看。文件说: 这就是我所拥有的 buildscript { repositories { jcenter() mavenCentral() google() maven { url "https://s3.amazonaws.com/moat-sdk-builds" } maven { url 'https://maven.go
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.
这是怎么回事?将此依赖项放在模块级
build.gradle
,而不是项目级
implementation('com.mopub:mopub-sdk:5.12.0@aar') {
transitive = true
}