最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Flutter Application failed for task ':app:compileFlutterBuildRelease' - Stack Overflow

programmeradmin5浏览0评论
/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.0.4/lib/controllers/rtm_client_event_handler.dart:76:7: Error: A value of
type 'Null Function(LocalInvitation)' can't be assigned to a variable of type 'dynamic Function(LocalInvitation, String)?'.
- 'LocalInvitation' is from 'package:agora_rtm/src/utils.dart' ('/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtm-1.5.9/lib/s
rc/utils.dart').
(AgoraRtmLocalInvitation invitation) {
^
/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.0.4/lib/controllers/rtm_client_event_handler.dart:81:7: Error: A value of
type 'void Function(LocalInvitation)' can't be assigned to a variable of type 'void Function(LocalInvitation, String)?'.
- 'LocalInvitation' is from 'package:agora_rtm/src/utils.dart' ('/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtm-1.5.9/lib/s
rc/utils.dart').
(AgoraRtmLocalInvitation invitation) {
^
/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/flutterwave_standard-1.0.4/lib/view/payment_widget.dart:61:19: Error: No named paramete
r with the name 'primary'.
primary: widget.style.getButtonColor(),
^^^^^^^
/C:/src/flutter/packages/flutter/lib/src/material/elevated_button.dart:204:22: Context: Found this candidate, but the arguments don't match.
static ButtonStyle styleFrom({
^^^^^^^^^
Target kernel_snapshot_program failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1685

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command 'C:\src\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 

BUILD FAILED in 26s
Running Gradle task 'assembleRelease'... 27.6s
Gradle task assembleRelease failed with exit code 1

having error while building apk i am using flutter version 3.27.1

/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.0.4/lib/controllers/rtm_client_event_handler.dart:76:7: Error: A value of
type 'Null Function(LocalInvitation)' can't be assigned to a variable of type 'dynamic Function(LocalInvitation, String)?'.
- 'LocalInvitation' is from 'package:agora_rtm/src/utils.dart' ('/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtm-1.5.9/lib/s
rc/utils.dart').
(AgoraRtmLocalInvitation invitation) {
^
/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.0.4/lib/controllers/rtm_client_event_handler.dart:81:7: Error: A value of
type 'void Function(LocalInvitation)' can't be assigned to a variable of type 'void Function(LocalInvitation, String)?'.
- 'LocalInvitation' is from 'package:agora_rtm/src/utils.dart' ('/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtm-1.5.9/lib/s
rc/utils.dart').
(AgoraRtmLocalInvitation invitation) {
^
/C:/Users/Rise%20Star/AppData/Local/Pub/Cache/hosted/pub.dev/flutterwave_standard-1.0.4/lib/view/payment_widget.dart:61:19: Error: No named paramete
r with the name 'primary'.
primary: widget.style.getButtonColor(),
^^^^^^^
/C:/src/flutter/packages/flutter/lib/src/material/elevated_button.dart:204:22: Context: Found this candidate, but the arguments don't match.
static ButtonStyle styleFrom({
^^^^^^^^^
Target kernel_snapshot_program failed: Exception


FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1685

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command 'C:\src\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.

BUILD FAILED in 26s
Running Gradle task 'assembleRelease'... 27.6s
Gradle task assembleRelease failed with exit code 1

having error while building apk i am using flutter version 3.27.1

Share Improve this question edited Mar 21 at 6:06 Abhijith 2,3272 gold badges17 silver badges43 bronze badges asked Mar 20 at 18:05 Rafiq KhanRafiq Khan 1 2
  • Have you already checked your environment through flutter doctor? Also, perform flutter clean. – DevQt Commented Mar 21 at 13:48
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – DevQt Commented Mar 21 at 13:48
Add a comment  | 

1 Answer 1

Reset to default 0

step 1:

delete pubspec.lock file and run flutter clean

step 2:

run dart pub cache clean or flutter pub cache clean

step 3:

run flutter pub get and run the app

发布评论

评论列表(0)

  1. 暂无评论