Karthikeyan P
Karthikeyan P

Reputation: 475

Flutter Build failed

While building and running the Flutter mobile application with flutter --version

Flutter 2.0.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision c5a4b4029c (3 days ago) • 2021-03-04 09:47:48 -0800 Engine • revision 40441def69 Tools • Dart 2.12.0

I am getting the below error.

Launching lib/main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'... /Applications/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/chewie-0.9.10/lib/src/chewie_player.dart:83:7: Error: No named parameter with the name 'resizeToAvoidBottomPadding'. resizeToAvoidBottomPadding: false, ^^^^^^^^^^^^^^^^^^^^^^^^^^ /Applications/Flutter/flutter/packages/flutter/lib/src/material/scaffold.dart:1451:9: Context: Found this candidate, but the arguments don't match. const Scaffold({ ^^^^^^^^ /Applications/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/chewie-0.9.10/lib/src/chewie_player.dart:276:17: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.

FAILURE: Build failed with an exception.

Process 'command '/Applications/Flutter/flutter/bin/flutter'' finished with non-zero exit value 1

BUILD FAILED in 39s Exception: Gradle task assembleDebug failed with exit code 1

On running flutter doctor no errors are shown. Based on some references even tried switching the flutter channel to beta, master, and dev but the issue still occurs. With the downgrade of the flutter version as well, I am unable to resolve this. The application was working well before and all of sudden this happened.

Please help me in resolving this. Thanks.

Upvotes: 0

Views: 1294

Answers (1)

xahid_rocks
xahid_rocks

Reputation: 702

As far as I assume, one of your package causing the problem, I think It's chewie_player.Try using latest version of it, Go to pub dev, and copy the dependence, paste it in .yaml file in place of older dependence.

Upvotes: 1

Related Questions