Hi all,
I’ve been trying to get firebase working with quasar cordova. My main reason is to get uniqueID for each app downloaded that I can use for authenticating with an api… and of course analytics.
My head is melted. Apparently Google broke Google march last year and now proper versioning between google & google no longer works, for just over a year?
Stack:
- Debian 9 stretch
- Gradle 5.4.1
- Quasar 1.0.0-beta-25 (same with issues with 0.17.13)
- OpenJDK 1.8.0_212
The app is the default quasar create...
and no changes are made to it. Also I remove src-cordova
and start from scratch with each of the bellow attempts.
So in research it seems there’s two ways to setup firebase:
- Follow google instructions in firebase when setting up account. Probably expected to fail as we’re not building a native app
- Use cordova-firebase-plugin
Using google
instructions results in:
Could not find method implementation() for arguments [com.google.firebase:firebase-core:16.0.9] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
After research seems this is an error because of old gradle version. I’ve updated to 5.4.1
, so implementation()
should now work, but it doesn’t. Get same error. Is there an internal gradle used by quasar
or cordova
?
Cleaning up before next test:
rm -rf src-cordova
quasar mode add cordova
quasar dev -m cordova -T android # check if default app loads
This time trying cordova-plugin-firebase
:
From here: https://github.com/arnesson/cordova-plugin-firebase and either placing the xml element in config.xml
or by using cordova
cli the result is the same:
* What went wrong:
Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.5.0,16.5.0], [16.4.0,16.4.0]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
Reading through the docs there is a recommendation to try (in this order):
- cordova-android-play-services-gradle-release
- cordova-android-firebase-gradle-release
The play services plugin (1 above) produces same error as cordova-plugin-firebase
but notice the versions requested and found in the error are different:
...
+-----------------------------------------------------------------
| cordova-android-play-services-gradle-release: 15.+
+-----------------------------------------------------------------
...
* What went wrong:
Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 15.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
On to cordova-android-firebase-gradle-release
and the error is the same as above with stdout reporting:
+-----------------------------------------------------------------
| cordova-android-play-services-gradle-release: 15.+
+-----------------------------------------------------------------
+-----------------------------------------------------------------
| cordova-android-firebase-gradle-release: 15.+
+-----------------------------------------------------------------
I’ve tried mutliple delete and re-install to get this working and lost. Is it possible to hook quasar cordova and firebase together? Has anybody got this working?