[Question]: Unstable Version Detected
What is your question?
Hi! I would like to use these plugins
- connectivity_plus
- device_info_plus
- package_info_plus
in my Flutter application.
My CI/CD procedure checks for any vulnerable dependencies. For these plugins, an unstable version is detected due to the version indicated in the build.gradle file of the native Android component (1.0-SNAPSHOT). Is it possible to align the version in the build.gradle file with the same version as the Dart side plugin?
Checklist before submitting a question
- [X] I searched issues in this repository and couldn't find such bug/problem
- [X] I Google'd a solution and I couldn't find it
- [X] I searched on StackOverflow for a solution and I couldn't find it
- [X] I read the README.md file of the plugin
- [X] I am using the latest version of the plugin
- [X] All dependencies are up to date with
flutter pub upgrade - [X] I did a
flutter clean - [X] I tried running the example project
mhh, I see what you mean. I think simply changing version '1.0-SNAPSHOT' to version '1.0' could be enough.
There is probably a lint option to disable that check as well.
The packages in flutter/packages have the same thing too:
https://github.com/flutter/packages/blob/e21f1ee67c0db17fe4d5587040c62d8da59e54e5/packages/url_launcher/url_launcher_android/android/build.gradle#L2C1-L2C23
Do you get warnings from their packages too?
Yes, I think the dependency analysis tool gets suspicious about the word "snapshot". I have the same problem with these dependencies from flutter/packages:
- path_provider_android
- url_launcher_android
I just opened a similar issue on their repository.
Got you, please post the link to the ticket here as well, I'd like to know what they decide
Sure, this is the related issue on flutter/packages: https://github.com/flutter/flutter/issues/156394
I got this error when running on android. is it the same issue? this issue happened when I update to latest version flutter
[ +97 ms] FAILURE: Build failed with an exception.
[ ] * What went wrong:
[ ] Execution failed for task ':device_info_plus:compileDebugJavaWithJavac'.
[ ] > Could not resolve all files for configuration ':device_info_plus:androidJdkImage'.
[ ] > Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
[ ] > Execution failed for JdkImageTransform:
my flutter doctor:
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1
24A348 darwin-arm64, locale en-MY)
[✓] Android toolchain - develop for Android devices
(Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.92.2)
[✓] VS Code (version 1.93.0-insider)
[✓] Connected device (6 available)
[✓] Network resources
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days