FlutterSecureStoragePlugin.java:260:错误:-source 7中不支持方法引用.<



当我构建扑动2.10.3应用程序时,显示错误:

Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Running Gradle task 'assembleDebug'...
/Users/xiaoqiangjiang/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-5.0.0/android/src/main/java/com/it_nomads/fluttersecurestorage/FlutterSecureStoragePlugin.java:250: error: lambda expressions are not supported in -source 7
handler.post(() -> methodResult.success(result));
^
(use -source 8 or higher to enable lambda expressions)
/Users/xiaoqiangjiang/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-5.0.0/android/src/main/java/com/it_nomads/fluttersecurestorage/FlutterSecureStoragePlugin.java:260: error: method references are not supported in -source 7
handler.post(methodResult::notImplemented);
^
(use -source 8 or higher to enable method references)
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flutter_secure_storage:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 8s
Exception: Gradle task assembleDebug failed with exit code 1

我应该做些什么来调整源版本?

尝试使用java 8的5.0.1版本。

5.0.1 #[Android]添加java 8对gradle构建的要求

请在其变更日志中检查相同的flutter_secure_storage

相关内容

  • 没有找到相关文章

最新更新