Thank you for shared this.
I have trouble with latest Meteor version to build Android app and I tried this configuration but still no build, error is: > Cannot add extension with name 'googleServices', as there is an extension already registered with that name.
Do you have some advice ?
Please make sure you do not another plugin (like I had cordova-play-services-version-adapter) adding googleServices which may cause problems. In earlier version this - cordova-play-services-version-adapter-- adapter plugin was used to resolve conflict for googleServices
"cordova-android": "^10.1.1",
"cordova-common": "^4.0.2",
"cordova-custom-config": "^5.1.0",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-local-notification": "^0.9.0-beta.3",type or paste code here
hope this helps (in your list you have not mentioned the versions, I think cordova plugins need to be of the right version. I feel only two of your plugins need to be checked ā cordova:@havesource/cordova-plugin-push which I suspect is used by activitree:push ( I use raix:push)
Many thanx for your time and sorry for plugin list without versionā¦ I updated now.
Yes, I use activitree:push for several months and it works very good, and @paulishca aided me many time, heās very helpfull.
Now I found this issue in github, seems to be clear now:
I hope it is solved in the futureā¦
One thingā¦ in my package.json there isānt your plugin but only:
I had seen this issue while I was trying to solve my build issues and it did give helpful hints for me.
I think the solution suggested in the github issue is done in my project using the mobile-config.js ā refer my first post in this message trail. And, I think, it is also linked to cordova:@havesource/cordova-plugin-push as this plugin is the core for push and firebase used within activitree:push
nothing to doā¦ I follow all steps but at the end is always:
BUILD SUCCESSFUL in 424ms
1 actionable task: 1 executed
%% Subproject Path: CordovaLib
Subproject Path: CordovaLibEmulator -
%% Subproject Path: app
Subproject Path: appndroid Emulator -
%% Gradle Distribution URL: https://services.gradle.org/distributions/gradle-7.1.1-all.zip
> Configure project :app
Adding classpath: com.google.gms:google-services:4.3.10
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
WARNING:: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 7.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
FAILURE: Build failed with an exception.
* Where:
Build file '/home/user/Sviluppo/meteor/mp/.meteor/local/cordova-build/platforms/android/app/build.gradle' line: 357
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.google.gms.google-services'.
> Cannot add extension with name 'googleServices', as there is an extension already registered with that name.
App is builded but there is an error in google services configurationā¦
@paulishca do you have some advice to give me ?
Have you see this issue ?
Iām using activitree:push from many months and works very well but now I canāt upgrade Meteor for this problems.
Hi @davideonmeteor, my advice is to troubleshoot this problem and if activitree:push needs an update, to submit a PR. The package requires a push plugin that is no longer supported however is not yet obsolete. That is the only Cordova specific component. I think your problem requires a Gradle/Android solution.
In your gradle file you seem to use the old ācompileā syntax instead of āimplementationsā, like so:
Hey there, Iām still struggeling with this and Iām really happy that I found this thread. I guess adding App.setPreference("GradlePluginGoogleServicesEnabled", true); App.setPreference("GradlePluginGoogleServicesVersion", "4.3.10");
is key.
Ok I finally got this working using phonegap-plugin-push, meteor 2.5.6 and activitree:push by @paulishca , though I find it a bit hacky:
1.) As mentioned above, add App.setPreference("GradlePluginGoogleServicesEnabled", true); App.setPreference("GradlePluginGoogleServicesVersion", "4.3.10"); to mobile-config.js
2.) After first build run for platform android, add google-services.json and in cordova-support-google-services gradle file, remove or comment out the line apply plugin: com.google.gms.googleservices.GoogleServicesPlugin. This is already done in the main gradle file by mobile-config.js and causes the error mentioned by @davideonmeteor
3.) Building now is working fine and push is sent to android devices.
@paulishca can we merge this somehow into your package?
this Push package does not contain/store gradle files or configurations. Those files are being generated by the Android tools based on the plugins content of your project. At times, actually very often, developers encounter version conflicts of different google plugins and there are strategies found in Google/Android that deal with these problems.
While I also believe these could be hinted to in this package, there is no particular place of the project that may accommodate gradle filesā¦because they are being generated by the android build process. You first need to generate, see what the problems may be and then correct those problems. This is what I understand from this matter and I am open to any suggestions if you think this can be integrated in the package.