when I debuging and run this error show up : - android

[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

Related

Why is flutter debugging is working when connected to computer, but downloading and launching the debug apk is not working?

I want to give a local release of my app to some friends so I tried to send them the debug APK for them to run on their phones but when the APK installs and they try to launch it, it will go directly to settings or simply not open.
name: raydeo
description: A new Flutter project.
publish_to: "none"
version: 1.0.0+1
environment:
sdk: ">=2.17.6 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
bloc: ^7.1.0
equatable: ^2.0.3
google_fonts: ^3.0.1
http: ^0.13.5
shared_preferences: ^2.0.15
intl_phone_field: ^3.1.0
firebase_core: ^1.20.0
firebase_auth: ^3.6.2
otp_text_field: ^1.1.3
hive: ^2.2.3
hive_flutter: ^1.1.0
mqtt5_client: ^3.3.1
hive_generator: ^1.1.3
build_runner: ^2.2.0
flutter_bloc: ^7.3.3
firebase_dynamic_links: ^4.3.4
share_plus: ^4.0.10+1
dev_dependencies:
flutter_test:
sdk: flutter
mockito: ^5.3.0
flutter_lints: ^2.0.0
flutter:
uses-material-design: true
This is the contents of my pubspec.yaml file. My flutter doctor is coming up clean. I am using an M1 mac. If anyone needs any other details please let me know.
i had same issue i closed and restarted the app after install. Then it worked.
this issue is debugged apk.
Try this
flutter build apk --release
if no sound
flutter build apk --release --no-sound-null-safety
Then find apk file. done!

Please solve this error as soon as possible

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

pub get failed error with image_editor_pro

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.

flutter pubspec.yaml exit code 65

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

how to sole pubspec error in androind studio

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:

Categories

Resources