image_gallery_saver
image_gallery_saver copied to clipboard
flutter 2.10 版本不兼容
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 以上的版本
I've got the same question
+1
any fix?
下载到本地,自己修改下Kotlin 的版本,从本地引入可以解决
+1
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:
- Clone package to your project (I created {root}/plugin for this purpose)
- 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?)
fix