Trying to add google ads in my app.
Here is the app-level build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.student.shopifysalespediasample"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services-ads:17.1.1'
}
And I'm getting an error in this line :
implementation 'com.google.android.gms:play-services-ads:17.1.1'
The Error Reads:
All gms/firebase libraries must use the exact same version specification(mixing versions can lead to runtime crashes). Found version 17.1.1,16.0.4,16.0.3,16.0.1,16.0.0. Examples include com.google.android.gms:play-services-ads:17.1.1 and com.google.android.gms:play-services-measurement-base:16.0.4
Please help, I have almost completed my app. The final step of adding ads is remaining. Your help is highly appreciated. Thanks!