-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find method google() for arguments [] on repository container #881
Comments
@briantq do you know why we add the |
@briantq looking at this Crashlytics setup guide, it says to add the |
@davidanaya for just workaround comment google() function from build.gradle file and after that it will work without build failure. @soumak77 looking forward to get it resolved. |
@Mykiee could you verify whether adding the following to the gradle file works or not?
|
@soumak77 I need to add this method under |
I created PR #882 which removes the need to add |
@davidanaya please install the plugin from master to verify this has been fixed
|
Works like a charm, @soumak77 thanks! |
Thanks @soumak77 :) |
@soumak77 I don't like that we removed the required setup steps for Firebase. Since only @Mykiee and @davidanaya are the only ones experiencing the issue, I'd check to see if it's environmental. I did a quick Google search (only took 60 seconds) but it looks like the issue might be due to an older gradle version, react-native-camera/react-native-camera#1530 (comment) I think we might check to see if that resolved the issue. @Mykiee and @davidanaya, what version of gradle are you using for your projects? |
@briantq It seems to me that the build would fail if the In any case, looks like I'll need to revert my changes. |
@briantq it was failing with 4.1 and I updated to 4.6 and still was failing |
@davidanaya do you have a gradle.properties located in platforms\android\gradle\wrapper? If so, can you paste the contents of that file please? |
I have a gradle-wrapper.properties file with these contents
|
Looks like you are using Gradle 3.3 for building your project. Check out these directions on how to upgrade your gradle version, https://blog.nishtahir.com/2018/04/15/how-to-properly-update-the-gradle-wrapper/ I am running 4.4. Based on the few stackoverflow posts I read, that should resolve your issue. You might consider upgrading your gradle version more often as 3.3 is well over a year and a half old... |
Thanks @briantq The thing is that this file is automatically generated by ionic (cordova) so even if I change it when I do the build it will be generated again with the wrong version; maybe the way to update gradle is by updating cordova itself (I'm using version 7.1.0) ? I upgraded gradle by android studio but it seems that this did not affect the version of gradle used in my project. |
Hi everyone. |
Thanks @guilhermegjr I will try but I need to sync with my team as we are using the same Ionic version for a few different apps and we need to check if it does not break anything. |
@davidanaya interesting, I do not use Ionic so I was not aware. With this knowledge I would do 2 things:
@guilhermegjr Thanks for the pointer! @davidanaya, definitely let us know if you are able to confirm that does resolve the issue. Looking at the Cordova Android 6.4.0 Release Notes, they explicitly reference gradle and that they are removing it going forward. It sounds like that might be the issue. |
I use ionic and I don't think it relies on a specific Gradle version. I suspect the Gradle version you have in your PATH is the old version and wasn't upgraded properly. Just a hunch. |
The Gradle Wrapper was designed to be self contained. When Android started using Gradle it was not very familiar and no one had it installed. Hence they designed a self contained system that overrides the system gradle and installs a version if you elected. If you run ./gradle, it will use the system but ./gradlew will definitely run the version specified in the gradle.properties. Just depends on which command Ionic runs (and possible the 6.3.0 version as it seems like gradlew might have been removed completely in later releases). |
Ionic relies on cordova for building the source. My app has
Therefore I think if you upgrade your |
This appears to be resolved. You'll need to update your |
what is the solution of this problem |
Describe the bug
Last version of the plugin causes an error when building the project in ionic.
To Reproduce
Create a blank ionic (v3) project.
ionic start cordova-firebase-plugin blank
Add the plugin
Build the app
Expected behavior
The project is build with no errors
Console Logs
Plugin Version
cordova-plugin-firebase 2.0.2 "Google Firebase Plugin"
Additional context
I created a project to replicate the issue.
The text was updated successfully, but these errors were encountered: