I want to update plugin intercom to latest version. I am using cordova version 9.0.0 For iOS works fine, but to update intercom for android I must have the version of platform >= 9.0.0 I updated from version 7.1.1 to 9.0.0 (android platform), but I got 2 errors. I think that is gradle cause these errors... Because I tried to make another fresh cordova project to see if everything works fine... but application does not run/build.
The text of errors:
FAILURE: Build completed with 2 failures.
Where: Script '..\platforms\android\cordova-plugin-intercom\be-intercom.gradle' line: 46
What went wrong: A problem occurred evaluating script.
Could not find method execute() for arguments [] on task ':app:copyGoogleServices' of type org.gradle.api.tasks.Copy.
compileSdkVersion is not specified. Please add it to build.gradle
I have google-services.json (in root). Everything works fine before this update.
In ..\platforms\android\cordova-plugin-intercom\be-intercom.gradle at line 46 is tasks.copyGoogleServices.execute()
.
The solution is to replace the execute() with finalizedBy() in platforms\android\cordova-plugin-intercom\be-intercom.gradle and to copy google-services.json in platforms\android\app. https://medium.com/@olku/gradle-5-0-broken-api-of-the-exec-task-5b2d76c8d121