flutter_ua_client_hints icon indicating copy to clipboard operation
flutter_ua_client_hints copied to clipboard

Support Android Studio Ladybug

Open dkaera opened this issue 1 year ago • 1 comments

Hey everyone, I’ve encountered an issue while migrating to the newly released Android Studio version, Ladybug:

Could not determine the dependencies of task ':ua_client_hints:bundleLibCompileToJarDebug'.
> Could not create task ':ua_client_hints:compileDebugJavaWithJavac'.
   > Failed to calculate the value of task ':ua_client_hints:compileDebugJavaWithJavac' property 'javaCompiler'.
      > Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=17, vendor=any vendor, implementation=vendor-specific} for MAC_OS on aarch64.
         > No locally installed toolchains match and toolchain download repositories have not been configured.

Honestly, I don’t see any reason to set the target JVM to version 17 for this package, especially since Flutter’s default setup uses JVM 1.8, which overrides this anyway and causes compatibility issues for end users of the plugin.

I propose updating the Kotlin and Gradle versions to meet the requirements of the latest Android Studio version, and that should resolve the issue. Let me know your thoughts or if you have any comments.

Here is PR

dkaera avatar Oct 21 '24 19:10 dkaera

I wanted to follow up on my previous comment regarding the issue with migrating to Android Studio Ladybug.

Initially, I mentioned that I didn’t see the need to set the target JVM to version 17, especially since Flutter’s default setup uses JVM 1.8. However, after further investigation and seeing the new warning:

warning: [options] source value 8 is obsolete and will be removed in a future release

It turns out that migrating to jvmTarget 17 was indeed the correct approach, but the implementation should have been handled differently. I apologize for the earlier suggestion that wasn’t fully accurate.

In the latest commit, I’ve made the necessary adjustments to properly migrate to jvmTarget 17, which should resolve the compatibility issues without conflicting with Flutter’s setup.

Please feel free to review the changes, and let me know your thoughts or if anything needs further tweaking.

dkaera avatar Oct 21 '24 19:10 dkaera

Ladybug support has been added in v1.4.1. We migrated jvmTarget to 17 and resolved the compatibility issues.

wasabeef avatar Jun 25 '25 12:06 wasabeef