Closed andirsun closed 3 years ago
I used this PR, and it now throws:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileInternalReleaseJavaWithJavac'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[19.0.
2]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-vision:20.0.0 -> com.google.android.gms:play-services-vision-co
mmon@[19.0.2], but play-services-vision-common version was 19.1.0.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-ml-vision@{strictly 24.1.0}
-- Project 'app' depends onto com.google.android.gms:play-services-vision-common@{strictly 19.1.0}
-- Project 'app' depends on project 'fast_qr_reader_view' which depends onto com.google.firebase:firebase-ml-vision@24.1
.0
-- Project 'app' depends onto com.google.android.gms:play-services-vision-image-label@{strictly 18.0.4}
-- Project 'app' depends onto com.google.android.gms:play-services-vision@{strictly 20.0.0}
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
I had something similar and ended up needing to make a few changes to the build.gradle file. The problem is, I think, that this plug-in is using a deprecated way of accessing the barcode scanner and is starting to conflict with other changes in the Android plugin eco-system.
The ideas below may or may not work for you:
Firstly, make sure that Google Services are still 4.3.3, e.g.
classpath 'com.google.gms:google-services:4.3.3
Add a dependency override for the problematic library, e.g. :
allprojects {
repositories {
google()
jcenter()
}
configurations.all {
resolutionStrategy {
forcedModules = [
"com.google.android.gms:play-services-vision-common:19.0.2",
]
}
}
}
And you may need to disable the check, added to the other build.gradle under the apply plugin
statements:
googleServices { disableVersionCheck = true }
When I get time I might give the FlutterFire plugin another look.
The PR is deprecated, I need to close now.