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