-
Notifications
You must be signed in to change notification settings - Fork 10
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
Problem with Google Play Service dependencies #9
Comments
Looking at the default dependencies for firestore and auth I'm not sure why this isn't working. The platforms/android/project.properties file will show the versions of everything being used. Can you post that? Could you also run the ./gradlew :app:dependencies command as suggested from within your platforms/android project and see what that gives? I have shared this pain before which is why I try to allow you to override the default versions with my plugins - but it can still be a challenge to know what you actually need to override them with! |
Hi, Thanks for your prompt attention. For the simple test project my project.properties file looks like this (comment lines removed): target=android-27 I'm not sure how to run gradlew from a Win CLI. Any idea?! Cheers, Darren |
Well they look OK - although I have seen problems with the plus notation before. I think you do '.\gradlew.bat app:dependencies' to run gradle for Windows. |
When running gradlew app:dependencies in the test root I get: FAILURE: Build failed with an exception.
Grief! Is anything ever easy? I assume you're developing on a Mac? |
I was wondering whether this is the cause and a possible solution to the issue? |
Also wondering whether I could control anything eith these variables in the project root's config.xml?
|
I thought I'd replied to this, sorry! You can control versions with those variables - simply specify the version you want when installing the plugin: cordova plugin install cordova-plugin-firestore --variable ANDROID_FIREBASE_FIRESTORE_VERSION=17.0.3 --save for example. I'm developing on Linux btw. Try going into platforms/android and just running: .\gradlew.bat dependencies That plugin you mention could be the cause of the problem - I will have to take a look as I'm not familiar with it. |
Hi, Thanks for looking at this - I'm really stuck! I tried altering the Firestore version when installing the plugin but really have no idea what I'm supposed to be doing to fix the clash. Running .\gradlew.bat dependencies in platform/android doesn't seem to tell me much else:
My cordova plugins show these versions: I really don't understand where the build clash is coming from: Any clues? As you know I've just created a new project and tried to build a test app using the latest plugins. Many thanks in advance. |
Is there any chance you could share a repo of your project, or a cut down version that exhibits the same problem? |
Hi again, There's no complexity to the project - I just followed these commands from scratch in my apps development folder: cordova create test com.test.app test And with that the build fails with the google services clash! |
After plugging away at this for a few hours I've managed a bit of progress - slightly! cordova create test2 com.test2.app test2 So now I get no errors about clashes of version, but.... I have a new error:
So am I getting closer or just digging a deeper hole?! Thanks for any advice. |
Incidentally - I get a similar dex problem if I try using cordova-plugin-firebaseui-auth instead of cordova-plugin-firebase-authentication. I suppose my basic question is: Can you recommend any combination of versions of cordova-plugin-firestore and any auth plugin that will build? |
Recommend is a strong word :-) But I have got two projects that use cordova-plugin-firestore and cordova-plugin-firebaseui-auth that do build (and run!) on Android and iOS. I am biased as I wrote both of these! I think that phonegap-plugin-multidex might help. I can also say that I was battling yesterday with one of my apps with dependency hell but I did get there in the end. Incidentally I tried your original project from a few posts back and for totally different issues! I believe that one of my projects only builds because of a dependency that gets added by phonegap-plugin-push - I need to see if I can add that dependency to my plugins as well. |
Further to the above, this is the list of plugins I currently have in my main project: cordova-plugin-actionsheet 2.3.3 "ActionSheet" I don't for one second believe you need or want all of these... |
LOL. That's a hell of a list :D |
Hi again, Getting ever closer. I managed to get a build using these plugins: So I was hoping that now my troubles were over. However I'm getting a strange error which looks like something's not setup right. I have copied your example in initialising the DB and trying to add a new user: Is this something familiar to you? Thanks for any advice. |
Hi agan, I saw your other issues with this plugin, specifically #7 I'm wondering whether any progress was made with that, or can you recommend a course of action I can take to get the latest FireStore API working with a Cordova project? Many thanks in advance. |
@Daz66 Hi, were you ever able to fix this problem ? |
Hi @Saturnyn |
HI,
I'm having a terrible problem trying to build an Android app using this plugin in conjunction with cordova-plugin-firebase-authentication. I'm hoping that someone can help!
To keep it simple I just do the following test from the CLI:
cordova create test com.test.app test
cd test
cordova platform add android
cordova plugin add cordova-plugin-firebase-authentication
cordova plugin add cordova-plugin-firestore
cordova build
And the output goes like this:
Android Studio project detected
ANDROID_HOME=S:\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8
studio
:wrapper
BUILD SUCCESSFUL
Total time: 21.782 secs
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_2qji639w163yahu2psl09gsre.run(C:\DocRoot\apps\test\platforms\android\app\build.gradle:145)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugRenderscript
:CordovaLib:checkDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:prepareLintJar
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:platformAttrExtractor
:CordovaLib:processDebugManifest
:CordovaLib:javaPreCompileDebug
:CordovaLib:processDebugJavaRes NO-SOURCE
:app:preBuild UP-TO-DATE
:app:preDebugBuild FAILED
FAILURE: Build failed with an exception.
The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.1.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
....
I've seen similar issues with other plugins where version dependencies clash, I just want to know has anyone got a solution that will enable these two firebase plugins to live in harmony?
My NPM version is 5.6.0, Cordova 8.1.2 ([email protected]), and I have the latest SDK Manager updates (excluding previews)
Many thanks for any advice.
Darren
Specifications
cordova-plugin-firebase-authentication 1.0.1 "cordova-plugin-firebase-authentication"
cordova-plugin-firestore 1.3.0 "Cordova Firestore Plugin"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
cordova-support-google-services 1.2.1 "cordova-support-google-services"
The text was updated successfully, but these errors were encountered: