當我構建顫振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
我應該怎么做才能調整源版本?
uj5u.com熱心網友回復:
嘗試使用具有 java 8 的 5.0.1 版本。
5.0.1 # [Android] 為 gradle 構建添加了 java 8 要求。
請在其更改日志中檢查相同的內容 flutter_secure_storage
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/497909.html
