Build with android studio fails
When building a flutter app with this library as dependency in android studio, it gives an error in a build log:
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [androidx.window:window:1.2.0] C:\Users\mock\.gradle\caches\8.10.1\transforms\b41269f68018ee3a6cde265ae09ac74f\transformed\jetified-window-1.2.0\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="androidx.window" to force usage (may lead to runtime failures)
Can we bump the minSdk in build.gradle to 19?
Also, building with latest openjdk versions (e.g. 22 or 23, not sure about 21) results in some warnings:
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
Java compiler has deprecated support for compiling with source/target compatibility version 8.
But these at least not critical and don't break the build, I suppose
Can we bump the minSdk in build.gradle to 19?
Could you provide a link to a repo hosting a minimal app that can reproduce the issue? Note that from I could from what you shared, it looks like the issue is related to androidx.window rather than being to do with this plugin
Also, building with latest openjdk versions (e.g. 22 or 23, not sure about 21) results in some warnings:
Aware of these but this will be a common issue as the Flutter SDK itself creates apps that set the source and target compatibility to 8. When it comes to this plugin, the warning may be that for a while as this setting is needed to support desugaring. To get rid of that would require bumping the min SDK much higher, which in turn restrict the number of supported devices
Aware of these but this will be a common issue as the Flutter SDK itself creates apps that set the source and target compatibility to 8. When it comes to this plugin, the warning may be that for a while as this setting is needed to support desugaring. To get rid of that would require bumping the min SDK much higher, which in turn restrict the number of supported devices
Thanks for the explanation. Forgive me for the lack of knowledge, but shouldn't desugaring with JDK11 should work fine since version 1.2.0? Judging by the changelog, newer version doesn't require usage of a newer min SDK? I don't thing AGP version is a problem either -- right now the project uses AGP 7.3.1, and it requires use of JDK11 or higher, so I doubt the current version even works in real world with JDK8 compatible (as max supported version) SDKs
@mock1328 you seem to be talking about something else that and this can get in the way of the issue you originally raised. I would advise to go back to provide a repo hosting a minimal app that can reproduce the issue you tried to report. Reason for asking for this is what you've shared so far doesn't point to this plugin being the issue and have yet to see anything that suggests bumping min SDK for the plugin solves the problem