0
我正在尝试将AdMob添加到我的应用程序中。我也跟着上市here说明,但它会导致错误,低于进口失败,com.google.android.gms.ads
不能得到解决:将Google Play服务导入到Android项目失败
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
这里是我的根gradle这个文件:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
// ...
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
,这里是我的应用程序。 gradle这个文件:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.firebase:firebase-core:9.4.0'
}
apply plugin: 'com.google.gms.google-services'
糟糕!你是对的,我输入了错误的firebase库! – VSB