编译 flutter 项目时出错(BlueBubbles)

问题描述 投票:0回答:0

这是我得到的错误:

C:\Users\hello\Documents\GitHub\bluebubbles-app> flutter build apk

💪 Building with sound null safety 💪

Checking the license for package Android SDK Tools in C:\Users\hello\AppData\Local\Android\sdk\licenses
License for package Android SDK Tools accepted.
Preparing "Install Android SDK Tools (revision: 26.1.1)".
"Install Android SDK Tools (revision: 26.1.1)" ready.
Installing Android SDK Tools in C:\Users\hello\AppData\Local\Android\sdk\tools
"Install Android SDK Tools (revision: 26.1.1)" complete.
"Install Android SDK Tools (revision: 26.1.1)" finished.
Checking the license for package Android SDK Build-Tools 30.0.3 in C:\Users\hello\AppData\Local\Android\sdk\licenses
License for package Android SDK Build-Tools 30.0.3 accepted.
Preparing "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)".
"Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" ready.
Installing Android SDK Build-Tools 30.0.3 in C:\Users\hello\AppData\Local\Android\sdk\build-tools\30.0.3
"Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" complete.
"Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" finished.
Checking the license for package Android SDK Platform 33 in C:\Users\hello\AppData\Local\Android\sdk\licenses
License for package Android SDK Platform 33 accepted.
Preparing "Install Android SDK Platform 33 (revision: 2)".
"Install Android SDK Platform 33 (revision: 2)" ready.
Installing Android SDK Platform 33 in C:\Users\hello\AppData\Local\Android\sdk\platforms\android-33
"Install Android SDK Platform 33 (revision: 2)" complete.
"Install Android SDK Platform 33 (revision: 2)" finished.
Checking the license for package Android SDK Platform 31 in C:\Users\hello\AppData\Local\Android\sdk\licenses
License for package Android SDK Platform 31 accepted.
Preparing "Install Android SDK Platform 31 (revision: 1)".
"Install Android SDK Platform 31 (revision: 1)" ready.
Installing Android SDK Platform 31 in C:\Users\hello\AppData\Local\Android\sdk\platforms\android-31
"Install Android SDK Platform 31 (revision: 1)" complete.
"Install Android SDK Platform 31 (revision: 1)" finished.
Checking the license for package Android SDK Platform 29 in C:\Users\hello\AppData\Local\Android\sdk\licenses
License for package Android SDK Platform 29 accepted.
Preparing "Install Android SDK Platform 29 (revision: 5)".
"Install Android SDK Platform 29 (revision: 5)" ready.
Installing Android SDK Platform 29 in C:\Users\hello\AppData\Local\Android\sdk\platforms\android-29
"Install Android SDK Platform 29 (revision: 5)" complete.
"Install Android SDK Platform 29 (revision: 5)" finished.
Checking the license for package Android SDK Platform 30 in C:\Users\hello\AppData\Local\Android\sdk\licenses
License for package Android SDK Platform 30 accepted.
Preparing "Install Android SDK Platform 30 (revision: 3)".
"Install Android SDK Platform 30 (revision: 3)" ready.
Installing Android SDK Platform 30 in C:\Users\hello\AppData\Local\Android\sdk\platforms\android-30
"Install Android SDK Platform 30 (revision: 3)" complete.
"Install Android SDK Platform 30 (revision: 3)" finished.
Checking the license for package Android SDK Platform 28 in C:\Users\hello\AppData\Local\Android\sdk\licenses
License for package Android SDK Platform 28 accepted.
Preparing "Install Android SDK Platform 28 (revision: 6)".
"Install Android SDK Platform 28 (revision: 6)" ready.
Installing Android SDK Platform 28 in C:\Users\hello\AppData\Local\Android\sdk\platforms\android-28
"Install Android SDK Platform 28 (revision: 6)" complete.
"Install Android SDK Platform 28 (revision: 6)" finished.
lib/app/layouts/conversation_view/widgets/text_field/conversation_text_field.dart:1031:24: Error: Type 'KeyboardInsertedContent' not found.
  void onContentCommit(KeyboardInsertedContent content) async {
                       ^^^^^^^^^^^^^^^^^^^^^^^
lib/app/layouts/conversation_view/widgets/text_field/conversation_text_field.dart:850:21: Error: No named parameter with the name 'contentInsertionConfiguration'.
                    contentInsertionConfiguration: ContentInsertionConfiguration(onContentInserted: onContentCommit),
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/tools/flutter/packages/flutter/lib/src/material/text_field.dart:253:9: Context: Found this candidate, but the arguments don't match.
  const TextField({
        ^^^^^^^^^
lib/app/layouts/conversation_view/widgets/text_field/conversation_text_field.dart:1021:19: Error: No named parameter with the name 'contentInsertionConfiguration'.
                  contentInsertionConfiguration: ContentInsertionConfiguration(onContentInserted: onContentCommit),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/tools/flutter/packages/flutter/lib/src/material/text_field.dart:253:9: Context: Found this candidate, but the arguments don't match.
  const TextField({
        ^^^^^^^^^
lib/app/layouts/conversation_view/widgets/text_field/conversation_text_field.dart:1031:24: Error: 'KeyboardInsertedContent' isn't a type.
  void onContentCommit(KeyboardInsertedContent content) async {
                       ^^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script 'C:\tools\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1151

* What went wrong:
Execution failed for task ':app:compileFlutterBuildAlphaRelease'.
> Process 'command 'C:\tools\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* 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 15m 58s
Running Gradle task 'assembleRelease'...                          961.0s
Gradle task assembleRelease failed with exit code 1

这不是我的存储库,它非常复杂,而且我是 dart 编程的新手。有人可以解释我做错了什么吗?这应该都是工作代码。我可能有错误的 flutter 版本吗?我做了 flutter 升级,它说我是最新的稳定版本。

android flutter
© www.soinside.com 2019 - 2024. All rights reserved.