platformexception in firebase auth - android

Error: The argument type 'Object' can't be assigned to the parameter type 'PlatformException'.
'Object' is from 'dart:core'.
'PlatformException' is from 'package:flutter/src/services/message_codec.dart' ('../../snap/flutter/common/flutter/packages/flutter/lib/src/services/message_codec.dart').
platformExceptionToFirebaseAuthException(exception),
^
FAILURE: Build failed with an exception.
Where:
Script '/home/e-tech/snap/flutter/common/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1102
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command '/home/e-tech/snap/flutter/common/flutter/bin/flutter'' 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 13s
Exception: Gradle task assembleDebug failed with exit code 1

take a look if you that Object that you want to use is from Firebase package or from Dart, in this case you are using dart:core but there's also firebase_core.
I assume you are using a class upon which it takes an Object as an argument, would be good if i see the code, but if is not working put dynamic instead and then along the way you'll figure out what's the issue.

Related

Build failure with an exception flutter

`
../../../../../AppData/Local/flutter/.pub-cache/hosted/pub.dartlang.org/platform-3.0.0/lib/src/interface/local_platform.dart:46:19: Error: Member not found: 'packageRoot'.
io.Platform.packageRoot; // ignore: deprecated_member_use
^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\HP\AppData\Local\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'C:\Users\HP\AppData\Local\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 19s
Running Gradle task 'assembleRelease'... 20.8s
Gradle task assembleRelease failed with exit code 1`
i cloned a swiggy ui to learn and started to build the apk from github repo and tried to build locally, just a beginner in flutter.
Read the below-mentioned article:
https://www.fluttercampus.com/guide/270/error-member-not-found-packageroot-flutter/
It might help you. The article provided four possible solutions. Try all the solutions & try your luck. If it does not work, then give me your flutter doctor summary.

Error: The parameter 'event' of the method 'AlwaysWinPanGestureRecognizer.addAllowedPointer' has type

I am having the below error after installing html_editor_enhanced: ^2.2.0+1-dev.1 in flutter
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_colorpicker-0.5.0/lib/src/hsv_picker.dart:730:43: Error: The parameter 'event' of the method 'AlwaysWinPanGestureRecognizer.addAllowedPointer' has type 'PointerDownEvent', which does not match the corresponding type, 'PointerEvent', in the overridden method, 'DragGestureRecognizer.addAllowedPointer'.
- 'PointerDownEvent' is from 'package:flutter/src/gestures/events.dart' ('/C:/flutter/packages/flutter/lib/src/gestures/events.dart').
- 'PointerEvent' is from 'package:flutter/src/gestures/events.dart' ('/C:/flutter/packages/flutter/lib/src/gestures/events.dart').
Change to a supertype of 'PointerEvent', or, for a covariant parameter, a subtype.
void addAllowedPointer(PointerDownEvent event) {
^
/C:/flutter/packages/flutter/lib/src/gestures/monodrag.dart:256:8: Context: This is the overridden method ('addAllowedPointer').
void addAllowedPointer(PointerEvent event) {
^
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\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.
What could be the solution?
I was following html_editor_enhanced
tutorial.
html_editor_enhanced dev here. To fix this, you can either upgrade to the new Flutter stable version (2.5.0) or use the instructions found here: https://github.com/tneotia/html-editor-enhanced/issues/68#issuecomment-863369808.

Execution failed for task app generate Debug Build Config

It gives me this problem and I don't know what to do to solve it, please help.
(FAILURE: Build failed with an exception.
Failed to calculate the value of task ':app:generateDebugBuildConfig' property 'buildConfigPackageName'.
Failed to query the value of property 'packageName'.
> java.lang.NumberFormatException: For input string: "TODO"
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 10s
Exception: Gradle task assembleDebug failed with exit code 1).
Go to your AndroidManifest.xml, look for TODO , probably next to packageName.
Change it to a number like 1.0.0.

update Android studio stops flutter framework

After I updated my studio flutter stops to run and error message appeared
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> 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.org
BUILD FAILED in 47s
Exception: Gradle task assembleDebug failed with exit code 1
how to fix this issue.
stack trace
I also had this issue, please run
flutter doctor
Check all cases are dismissed. If not solve those first. it should work then

I can't run my flutter existing projects, what is happening?

I keep getting this error and I don't seem to find any help online. I am new to flutter, vscode and this whole programming world. Any help is very well appreciated. The thing is I can't run my previous projects but I actually can if I create new ones.
This is what it is printed in the debug console when I try to run my previous projects:
FAILURE: Build failed with an exception.
Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 896
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
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.org
BUILD FAILED in 19s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Categories

Resources