[Flutter]Error due to url_launcher Package(Path not found) - android

I am using the url_launcher package in flutter and it gives me this error.. If i remove this package then everythin works fine, How to fix this Thing ?
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:10:8: Error: Error when reading '/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_platform_interface-1.0.8/lib/url_launcher_platform_interface.dart': The system cannot find the path specified.
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';
^
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:92:29: Error: Getter not found: 'UrlLauncherPlatform'.
final bool result = await UrlLauncherPlatform.instance.launch(
^^^^^^^^^^^^^^^^^^^
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:116:16: Error: Getter not found: 'UrlLauncherPlatform'.
return await UrlLauncherPlatform.instance.canLaunch(urlString);
^^^^^^^^^^^^^^^^^^^
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:131:16: Error: Getter not found: 'UrlLauncherPlatform'.
return await UrlLauncherPlatform.instance.closeWebView();
^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'F:\Program Files\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'F:\Program Files\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 8m 42s
Exception: Gradle task assembleDebug failed with exit code 1

Related

Flutter github action error while building apk file

Running Gradle task 'assembleRelease'...
lib/Data/Repositories/category/subcategory_repository.dart:1:8: Error: Error when reading 'lib/Data/Data_Providers/category/subcategory_service_api.dart': No such file or directory
import 'package:unicorn_store/Data/Data_Providers/category/subcategory_service_api.dart';
^
lib/Data/Repositories/category/category_respository.dart:1:8: Error: Error when reading 'lib/Data/Data_Providers/category/category_service_api.dart': No such file or directory
import 'package:unicorn_store/Data/Data_Providers/category/category_service_api.dart';
^
lib/Data/Repositories/category/subcategory_repository.dart:6:34: Error: Method not found: 'SubCategoryServiceApi'.
final _subCategoryServiceApi = SubCategoryServiceApi();
^^^^^^^^^^^^^^^^^^^^^
lib/Data/Repositories/category/category_respository.dart:5:31: Error: Method not found: 'CategoryServiceApi'.
final _categoryServiceApi = CategoryServiceApi();
^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script '/opt/hostedtoolcache/flutter/2.10.3-stable/x64/packages/flutter_tools/gradle/flutter.gradle' line: 1102
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command '/opt/hostedtoolcache/flutter/2.10.3-stable/x64/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 1m 30s
Running Gradle task 'assembleRelease'... 90.8s
Gradle task assembleRelease failed with exit code 1
Error: Process completed with exit code 1.

platformexception in firebase auth

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.

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.

After running flutter clean the project throwing gradle error

After doing a flutter clean the following error is being shown when I try to run the project.
/../software/flutter/packages/flutter/lib/src/services/message_codecs.dart:580:29: Error: Expected ')' before this.
if (errorCode is String &flut& (errorMessage == null || errorMessage is String) && !buffer.hasRemaining)
^
FAILURE: Build failed with an exception.
Where:
Script 'Development/software/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 991
What went wrong:
Execution failed for task ':app:compileFlutterBuildDevDebug'.
Process 'command '
Development/software/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 12s
Exception: Gradle task assembleDevDebug failed with exit code 1
Any help is greatly appreciated. Thank you in advance.
Have you Flutter pub get after use Flutter clean

No named parameter with the name error in flutter

When I run my flutter application on android studio this error appear, I did flutter clean and many commands but it didn't work.
Running Gradle task 'assembleDebug'...
/E:/setupfolder/programs/AndroidSDK/flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-1.6.4/lib/src/smart_refresher.dart:434:9: Error: No named parameter with the name 'keyboardDismissBehavior'.
keyboardDismissBehavior:
^^^^^^^^^^^^^^^^^^^^^^^
/E:/setupfolder/programs/AndroidSDK/flutter/packages/flutter/lib/src/widgets/scroll_view.dart:588:9: Context: Found this candidate, but the arguments don't match.
const CustomScrollView({
^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'E:\setupfolder\programs\AndroidSDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'E:\setupfolder\programs\AndroidSDK\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.
Update the version of pull_to_refresh to ^1.6.4 in pubspec.yaml
Downgrade pull_to_refresh to version 1.6.3
It is not compatible with the latest version of flutter
https://github.com/peng8350/flutter_pulltorefresh/issues/424

Categories

Resources