Closed dimitriscsd closed 2 years ago
Hello. One thing I noticed initially is that when I add the following code into my build.gradle, everything builds fine. I believe this has to do with versions of these packages, as what this does is override all dependencies to the latest version.
configurations.all {
resolutionStrategy {
force 'com.google.android.gms:play-services-vision-common:+'
force 'com.google.android.gms:play-services-vision-face-contour-internal:+'
force 'com.google.firebase:firebase-ml-vision-face-model:+'
}
}
That got me thinking and I looked further. I believe the issue is perfectly described here:
https://github.com/firebase/firebase-android-sdk/issues/1904
Apparently, the anyline plugin needs to migrate to the new ML kit, the guide for which is linked at the last comment of the discussion above.
ALTERNATIVELY (but i assume not valid forever) I have found a workaround that allows this to work, as per instructions on
https://firebase.google.com/support/release-notes/android#mlkit-self-serve-fixes
So with the instructions above, the gradle file for the anyline plugin (with updated recent versions) will look like this:
dependencies {
implementation 'com.google.firebase:firebase-ml-vision:24.1.0'
implementation 'com.google.android.gms:play-services-vision:20.1.1'
implementation 'com.google.android.gms:play-services-vision-common:19.1.1'
implementation 'com.google.firebase:firebase-ml-vision-face-model:20.0.2'
implementation 'com.google.android.gms:play-services-vision-face-contour-internal:16.0.2'
implementation 'io.anyline:anylinesdk:25-NoDocUI'
}
With the above, the issue is solved and everything builds properly. It would be nice if you guys could please make a new release fixing this, as it's not correct for us to be editing plugin code manually. Plugins are not part of our version control system.
I have submitted a pull request with the workaround mentioned above: https://github.com/Anyline/anyline-ocr-cordova-module/pull/49
However a migration to the new ML kit would be the proper long term solution.
We don't actively monitor the Github Issues, please raise a support request using the Anyline Helpdesk. Link to Anyline Helpdesk: https://anyline.atlassian.net/servicedesk/customer/portal/2/group/6
When raising a support request based on this Github Issue, please fill out and include the following information:
Support request concerning Anyline Github Repository: [URL to relevant Anyline Github Repository here] Support request based on Github Issue: [URL to relevant Github Issue here]
Thank you so much!
Anyline Cordova Plugin version: 24.1.0 or 25.0.0
I'm submitting a ... [x] bug report [ ] feature request [ ] general question
Occurring on ... [x] Android [ ] iOS
Current behavior: After upgrading to cordova-android version 9.0.0 and enabling androidX, there is some kind of conflict with firebase. I am getting the following error at buildtime:
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.
Go to the documentation to learn how to Fix dependency resolution errors.
If I remove the anyline plugin, it builds just fine.
Expected behavior: This would just work with android 8.0.0
Steps to reproduce: I am using this in combination with cordova-plugin-fcm-with-dependecy-updated I have also tried with version 25.0.0 and the results are the same.