Hi everyone,
I have made an ionic app last year and now I tried to integrate Admob Free plugin but build got error.
I tried some solutions suits with this error but still couldn’t have any good result.
What I have done to solve it :
1-) google-services-x libs were 11.0.4 and changed them to 19.5.0 in platforms/android/project.properties :
cordova.system.library.1=com.squareup.okhttp3:okhttp-urlconnection:3.10.0
cordova.system.library.2=com.google.firebase:firebase-core:16.0.9
cordova.system.library.3=com.google.firebase:firebase-messaging:18.0.0
cordova.gradle.include.2=cordova-plugin-fcm-with-dependecy-updated/footballxy-FCMPlugin.gradle
cordova.system.library.4=com.android.support:support-annotations:27.+
cordova.system.library.5=com.google.android.gms:play-services-base:19.5.0
cordova.system.library.6=com.google.android.gms:play-services-ads:19.5.0
2-) Also changed them to 19.5.0 in platforms/android/app/build.gradle
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
implementation(project(path: ":CordovaLib"))
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.10.0"
implementation "com.google.firebase:firebase-core:16.0.9"
implementation "com.google.firebase:firebase-messaging:18.0.0"
implementation "com.android.support:support-annotations:27.+"
implementation "com.google.android.gms:play-services-base:19.5.0"
implementation "com.google.android.gms:play-services-ads:19.5.0"
// SUB-PROJECT DEPENDENCIES END
}
3-) Also set default version of play services to 19.5.0 in plugins/cordova-admob-sdk/plugin.xml
<platform name="android">
<preference name="PLAY_SERVICES_VERSION" default="19.5.0"/>
<framework src="com.google.android.gms:play-services-base:$PLAY_SERVICES_VERSION" />
<framework src="com.google.android.gms:play-services-ads:$PLAY_SERVICES_VERSION" />
</platform>
And here is my error
- What went wrong:
Failed to capture fingerprint of input files for task ‘:app:preDebugBuild’ property ‘compileManifests’ during up-to-date check.
In project ‘app’ a resolved Google Play services library dependency depends on another at an exact version (e.g. “[16.5.
0]”, but isn’t being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-measurement-api:16.5.0 → com.google.android.gms:play-services-
measurement-sdk-api@[16.5.0], but play-services-measurement-sdk-api version was 17.0.0.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
– Project ‘app’ depends onto com.google.android.gms:play-services-ads@18.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-measurement-sdk@16.5.0
– Project ‘app’ depends onto com.google.firebase:firebase-analytics@16.5.0
– Project ‘app’ depends onto com.google.android.gms:play-services-ads@19.5.0
– Project ‘app’ depends onto com.google.android.gms:play-services-measurement-sdk-api@17.0.0
– Project ‘app’ depends onto com.google.android.gms:play-services-measurement-api@16.5.0
– Project ‘app’ depends onto com.google.firebase:firebase-core@16.0.9
– Project ‘app’ depends onto com.google.android.gms:play-services-ads-lite@18.0.0
Thanks for your help, masters!