image_gallery_saver icon indicating copy to clipboard operation
image_gallery_saver copied to clipboard

flutter 2.10 版本不兼容

Open 1227228155 opened this issue 3 years ago • 6 comments

E:\flutter2.10.2\flutter.pub-cache\hosted\pub.flutter-io.cn\image_gallery_saver-1.7.1\android\src\main\kotlin\com\example\imagegallerysaver\ImageGallerySaverPlugin.kt: (73, 28): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16.

Flutter 2.10 强制要求 Kotlin 1.5.31 以上的版本

1227228155 avatar Feb 25 '22 06:02 1227228155

I've got the same question

zqiuqi007 avatar Mar 02 '22 08:03 zqiuqi007

+1

luckysmg avatar Mar 07 '22 10:03 luckysmg

any fix?

mariusschroeter avatar Mar 18 '22 11:03 mariusschroeter

下载到本地,自己修改下Kotlin 的版本,从本地引入可以解决

zqiuqi007 avatar Mar 31 '22 09:03 zqiuqi007

+1

changkuanlai avatar Apr 02 '22 02:04 changkuanlai

The plugin itself needs the Kotlin version updated. I'm creating a PR for the fix, but these steps worked for me while we wait for an update:

  1. Clone package to your project (I created {root}/plugin for this purpose)
  2. Make the following changes to plugin/image_gallery_saver-1.7.1/android/build.gradle:
  • update ext.kotlin.version = 1.7.0
  • update classpath 'com.android.tools.build:gradle:7.0.3' (maybe optional?)

robjvan avatar Jun 16 '22 12:06 robjvan

fix

woodwen avatar May 31 '23 08:05 woodwen