Error detected in pubspec.yaml:
Error on line 37, column 3: Expected ':'.
╷
37 │ cupertino_icons: ^1.0.2:
│ ^
╵
Please correct the pubspec.yaml file at C:\Androidstudio\Projects_8.whatsappclone\pubspec.yaml
exit code 1
Remove the colon after dependency's version code
From this:
cupertino_icons: ^1.0.2:
To this:
cupertino_icons: ^1.0.2
Remove the colon near the cupertino_icons version.
cupertino_icons: ^1.0.2: -> cupertino_icons: ^1.0.2
then run flutter pub get again
Related
[flutter_application_2] flutter pub get
Running "flutter pub get" in flutter_application_2...
Resolving dependencies...
Error on line 11, column 5 of pubspec.yaml: A dependency may only have one source.
╷
11 │ ┌ sdk: flutter
12 │ │ get: ^4.5.1
13 │ └
╵
pub get failed
command: "C:\src\flutter\bin\cache\dart-sdk\bin\dart __deprecated_pub --directory . get --example"
pub env: {
"FLUTTER_ROOT": "C:\src\flutter",
"PUB_ENVIRONMENT": "vscode.dart-code:flutter_cli:get",
"PUB_CACHE": "C:\Users\Dell\AppData\Local\Pub\Cache",
}
exit code: 65
exit code 65
this is my pubspec.yaml filed
name: flutter_application_2
description: A new Flutter project.
publish_to: 'none'
version: 0.1.0
environment:
sdk: '>=2.19.1 <3.0.0'
dependencies:
flutter:
sdk: flutter
get: ^4.5.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter:
uses-material-design: true
I try to change the version of get: ^4.5.1
When I run my Flutter codes, I get an error like this:
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:firebase_auth
For solutions, see https://dart.dev/go/unsound-null-safety
Restarted application in 922ms.
pubspec.yaml:
name: simto_todolist
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
androidX: true
environment:
sdk: ">=2.15.1 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
firebase_auth: ^0.6.2+1
dev_dependencies:
flutter_test:
sdk: flutter
global_configuration: ^1.6.0
flutter_lints: ^1.0.0
get_storage: ^2.0.3
carousel_slider: ^4.0.0
cool_alert: ^1.1.0
timer_count_down: ^2.2.1
modal_bottom_sheet: ^2.0.1
persistent_bottom_nav_bar: ^4.0.2
group_button: ^4.6.0
flutter_signin_button: ^2.0.0
google_sign_in: ^5.2.4
firebase_core: ^1.13.1
flutter:
uses-material-design: true
assets:
- splash1.png
- splash2.png
- splash3.png
- splash4.png
- logo.png
fonts:
- family: Roboto
fonts:
- asset: fonts/Roboto-Bold.ttf
- asset: fonts/Roboto-Light.ttf
- asset: fonts/Roboto-Medium.ttf
- asset: fonts/Roboto-Thin.ttf
I think the problem is in the firabase_auth package. I've searched a lot but couldn't find how to fix the problem.
What is the problem? How can I solve it? Thanks in advance for the help.
#MuhammadJunaidKhalid When I upgrade the firebase_auth version to the latest version, I get this output:
Because no versions of global_configuration match >1.6.0 <2.0.0 and global_configuration 1.6.0 depends on http ^0.12.2, global_configuration ^1.6.0 requires http ^0.12.2.
And because no versions of http match >0.12.2 <0.13.0 and http 0.12.2 depends on http_parser >=0.0.1 <4.0.0, global_configuration ^1.6.0 requires http_parser >=0.0.1 <4.0.0.
And because firebase_auth >=3.3.9 depends on firebase_auth_web ^3.3.9 which depends on http_parser ^4.0.0, global_configuration ^1.6.0 is incompatible with firebase_auth >=3.3.9.
So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.
pub get failed (1; So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.)
exit code 1
The error I got after doing what #Royalindo said:
PS C:\Users\emiry\Desktop\Simto-To-Do-List\simto_todolist> flutter pub get
Because no versions of global_configuration match >1.6.0 <2.0.0 and global_configuration 1.6.0 depends on http ^0.12.2, global_configuration ^1.6.0 requires http ^0.12.2.
And because no versions of http match >0.12.2 <0.13.0 and http 0.12.2 depends on http_parser >=0.0.1 <4.0.0, global_configuration ^1.6.0 requires http_parser >=0.0.1 <4.0.0.
And because firebase_auth >=3.3.9 depends on firebase_auth_web ^3.3.9 which depends on http_parser ^4.0.0, global_configuration ^1.6.0 is incompatible with firebase_auth >=3.3.9.
So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.
Running "flutter pub get" in simto_todolist...
pub get failed (1; So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.)
In the Dart file
Add // #dart=2.9 at the top in your main.dart file.
// #dart=2.9 import 'package:flutter/material.dart';
void main() { //... }
Using the command line
flutter run --no-sound-null-safety Or to be specific (say in Chrome)
flutter run -d chrome --no-sound-null-safety
I am using Flutter to edit images such as crop and filter functionalities. I found this plugin https://pub.dev/packages/image_editor_pro
I get this error while installing this package and its dependencies.
Cannot open file, path = 'C:\flutter\.pub-cache\_temp\dir5ba449a4\test\fixtures\invalid\n_structure_<.>.json' (OS Error: The filename, directory name, or volume label syntax is incorrect.
, errno = 123)
pub finished with exit code 66
I have tried everything based on previous answers related such as
flutter clean
flutter pub cache repair
Here is the pubspec.yaml
name: application_editing
description: A new Flutter project.
environment:
sdk: ">=2.7.0 <3.0.0"
flutter: ">=1.20.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
zoom_widget: ^0.1.3
font_awesome_flutter: ^9.0.0
image_picker: ^0.7.4
path_provider: ^2.0.1
permission_handler: ^7.0.0
dio: ^4.0.0
screenshot: ^0.3.0
signature: ^4.0.2
flutter_colorpicker: ^0.4.0
firexcode: ^1.0.5
flutter_web_plugins:
sdk: flutter
collection: ^1.15.0
dev_dependencies:
pedantic: ^1.9.2
flutter_test:
sdk: flutter
Also deleting pub cache folder. Nothing worked. The issue comes only when I install this image_editor_pro plugin. It is not the case with any other plugin.
I think it is because you have added the wrong package, or the image URL which you added in your assets doesn't exist.
My Flutter pubspec.yaml does not get the packages. This error show:
Error on line 30, column 22 of pubspec.yaml: Invalid version constraint: Expected version number after "^" in "^^4.2.1", got "^4.2.1".
╷
30 │ animated_text_kit: ^^4.2.1
│ ^^^^^^^
╵
pub get failed (65; ╵)
exit code 65
This is my dependencies:
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
animated_text_kit: ^4.2.1
cupertino_icons: ^1.0.3
audioplayers: ^0.16.1
dev_dependencies:
flutter_test:
sdk: flutter
I checked indentation, versions and so on.
What should i do?
Exit code 65 on pubspec.yaml indicates that the file is not well-formatted. You need to check the file again where is the problem or share the full yaml file so that I can check. Or try flutter clean and then flutter pub get in the terminal if you are confident about the formatting.
Try to below code and then run flutter pub get refer documentation here
dependencies:
flutter:
sdk: flutter
audioplayers: ^0.16.1
animated_text_kit: ^4.2.1
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.3
getting error in pubspec.yaml i am not able to sort it out...pls help
CODE:
name: i_am_rich
description: A new Flutter application.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets :
- images/ diamond.png
Error:
C:\src\flutter\flutter\bin\flutter.bat --no-color pub get
Error detected in pubspec.yaml:
Error on line 18, column 15: Mapping values are not allowed here. Did you miss a colon earlier?
╷
18 │ assets :
│ ^
╵
Please correct the pubspec.yaml file at C:\Users\BHASKAR\Documents\appdev\i_am_rich\i_am_rich\pubspec.yaml
Process finished with exit code 1
You have unnecessary spaces between assets and : here:
assets :
it should be
assets: