-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while running the flutter app #84689
Comments
Could you edit your question and format the logs into something like the below (Insert Code, or use ``` before and after it). Also, please send a minimal code example of the application and the output of
|
Minimal code example of application means ? [√] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.19042.985], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [√] Chrome - develop for the web [√] Android Studio [√] IntelliJ IDEA Ultimate Edition (version 2021.1) [√] VS Code (version 1.57.0) [√] Connected device (2 available) • No issues found! |
@spidervirus Closing from here, as this isn't an issue. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
I have error while running the flutter app
Debug Console :
``Launching lib\main.dart on Android SDK built for x86 in debug mode...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
../../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/notifier-1.0.2/lib/notifier_provider.dart:16:21: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
return (context.inheritFromWidgetOfExactType(NotifierProvider)
../../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_google_places-0.2.6/lib/src/flutter_google_places.dart:74:41: Error: Method not found: 'TypeMatcher'.
context.ancestorStateOfType(const TypeMatcher());
^^^^^^^^^^^
../../../Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_google_places-0.2.6/lib/src/flutter_google_places.dart:74:15: Error: The method 'ancestorStateOfType' isn't defined for the class 'BuildContext'.
Try correcting the name to the name of an existing method, or defining a method named 'ancestorStateOfType'.
context.ancestorStateOfType(const TypeMatcher());
^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\acer\Documents\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
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 26s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm) ``
pubspec.yaml :
``name: product
description: A new Flutter project.
The following defines the version and build number for your application.
A version number is three numbers separated by dots, like 1.2.43
followed by an optional build number separated by a +.
Both the version and the builder number may be overridden in flutter
build by specifying --build-name and --build-number, respectively.
In Android, build-name is used as versionName while build-number used as versionCode.
Read more about Android versioning at https://developer.android.com/studio/publish/versioning
In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
Read more about iOS versioning at
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.1+1
environment:
sdk: ">=2.3.0 <3.0.0"
sdk: ">=2.2.2 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
The following adds the Cupertino Icons font to your application.
Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
location: 3.0.1
google_maps_flutter: 0.5.31
geocoder: ^0.2.1
smooth_star_rating: ^1.0.3
flutter_speed_dial: ^1.2.1
stripe_payment: ^1.0.7
shared_preferences: 0.5.4+5
rxdart: 0.24.1
http: ^0.12.0+1
firebase_auth: 0.14.0+9
auto_size_text: 2.1.0
google_maps_webservice: ^0.0.14
flutter_google_places: ^0.2.3
geolocator: ^5.0.0
braintree_payment: 1.2.4
transformer_page_view: 0.1.6
url_launcher: 5.4.10
firebase_messaging: ^5.0.4
notifier: 1.0.2
fluttertoast: 4.0.1
carousel_slider: 2.2.1
flutter_polyline_points: ^0.1.0
firebase_admob: 0.9.3+2
razorpay_flutter: 1.2.2
flutter_local_notifications: 1.4.4+4
sms_otp_auto_verify:
progressive_image:
rflutter_alert:
dev_dependencies:
flutter_test:
sdk: flutter
For information on the generic Dart part of this file, see the
following page: https://dart.dev/tools/pub/pubspec
The following section is specific to Flutter.
flutter:
The following line ensures that the Material Icons font is
included with your application, so that you can use the icons in
the material Icons class.
uses-material-design: true
To add assets to your application, add an assets section, like this:
assets:
emptyCart
An image asset can refer to one or more resolution-specific "variants", see
https://flutter.dev/assets-and-images/#resolution-aware.
For details regarding adding assets from package dependencies, see
https://flutter.dev/assets-and-images/#from-packages
To add custom fonts to your application, add a fonts section here,
in this "flutter" section. Each entry in this list should have a
"family" key with the font family name, and a "fonts" key with a
list giving the asset and other descriptors for the font. For
example:
fonts:
- family: Quicksand
fonts:
- asset: Assets/Font/Quicksand-Bold.ttf
- asset: Assets/Font/Quicksand-Light.ttf
- asset: Assets/Font/Quicksand-Medium.ttf
- asset: Assets/Font/Quicksand-Regular.ttf
weight: 700
fonts:
- family: Schyler
fonts:
- asset: fonts/Schyler-Regular.ttf
- asset: fonts/Schyler-Italic.ttf
- family: Trajan Pro
fonts:
- asset: fonts/TrajanPro.ttf
- asset: fonts/TrajanPro_Bold.ttf
weight: 700
For details regarding fonts from package dependencies,
see https://flutter.dev/custom-fonts/#from-packages
``
Please kindly look into the matter and please try to help me out
The text was updated successfully, but these errors were encountered: