Open runningcode opened 6 years ago
This is a known problem with the library when used in an app that makes use of other Firebase products along with the Google services plugin. It has to do with the way the plugin works. It looks at the version number of all Firebase and Play SDK dependencies to make sure they're at a minimum version. Normally, they are all also supposed to be the same version. Firebase dependencies are identified by their maven group id, which is "com.google.firebase".
This poses kind of a problem for this screenshot library, because it was published with the same group id as the Firebase SDKs. Since it doesn't get released with the other Firebase SDKs and doesn't meet the minimum version number, the plugin complains.
There are a number of solutions:
We could change the group name of this library. I'd rather not do this, because it's preferable to keep all Firebase product libraries together in the same space.
We could start the versioning at 9.0.0. This is a little bit silly. :-)
You could clone the source code of this project to a module in your app space and work with it directly.
You could clone and change the group id yourself and publish to a local maven repo, or some other private repo you control, where you can reference it by its new maven coordinates.
You could remove the Google services plugin from your build and instead initialize the Firebase SDK on your own. I've written a couple blogs that talk about how this works.
Wait for the Firebase SDKs to enhance the way they're versioned and managed. The Google services plugin will no longer be required at this point. There are no announcements about when this change will take effect for developers.
Given that #6 will eventually make the screenshot library work the way it was intended, with proper versioning, we won't be implementing #1 or #2 above. I suggest that developers who want to use this library today should consider options #3 through #5.
For discussion, please join us in the Firebase slack in the #test-lab channel. https://firebase.community/
15:52 Gradle sync failed: Version: 0.1 is lower than the minimum version (9.0.0) required for google-services plugin. Consult IDE log for more details (Help | Show Log) (943ms)
to reproduce, add
androidTestCompile 'com.google.firebase:testlab-instr-lib:0.1'
andapply plugin: 'com.google.gms.google-services'
to the same module.