flutter starting error: version solving failed - android

I have downloaded a flutter project and placed the lib, assets and pubsec.yaml files in a new project. After "flutter packages get" There are more than 1k+ error. this the error:
Because fluttermultigrocery depends on flutter_localizations any from sdk which depends
on intl 0.17.0-nullsafety.2, intl 0.17.0-nullsafety.2 is required.
So, because fluttermultigrocery depends on intl ^0.16.1, version solving failed.
pub get failed (1; So, because fluttermultigrocery depends on intl ^0.16.1, version solving failed.)
this are my pubsec.yaml dependencies:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^0.1.3
optimized_cached_image: ^0.1.15
cached_network_image: ^2.3.1
flutter_cache_manager: ^1.4.1 #for cached_network_image
http: ^0.12.2
provider: 4.3.2+2
connectivity: 0.4.9+2
dynamic_theme: ^1.0.1
sembast: ^2.4.7+6
path_provider: ^1.6.14
intl: ^0.16.1
shimmer: ^1.1.1
url_launcher: ^5.5.2
carousel_slider: 2.2.1
firebase_core: ^0.5.0
firebase_messaging: 7.0.0
dev_dependencies:
flutter_test:
sdk: flutter
#flutter_local_notifications:

Just remove the version in dependency which creates problem and it will work
like => firebase_core: (Don't specify version)
firebase_messaging: (Don't specify version)

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!

Flutter Error: Cannot run with sound null safety, because the following dependencies don't support null safety:

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

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 Firebase Version Solving Failed - Expert Please Specify Version

Because cloud_firestore_web 0.2.1+2 depends on http_parser ^3.1.3 and no versions of cloud_firestore_web match >0.2.1+2 <0.3.0, cloud_firestore_web ^0.2.1+2 requires http_parser ^3.1.3.
And because http >=0.13.0 depends on http_parser ^4.0.0 and cloud_firestore 0.14.4 depends on cloud_firestore_web ^0.2.1+2, http >=0.13.0 is incompatible with cloud_firestore 0.14.4.
So, because markets depends on both cloud_firestore 0.14.4 and http 0.13.2, version solving failed.
pub get failed (1; So, because markets depends on both cloud_firestore 0.14.4 and http 0.13.2, version solving failed.)
I am new in flutter, please help me to solve this issue
name: markets
description: markets
version: 2.0.0+9
environment:
sdk: ">=2.2.2 <3.0.0"
module:
androidX: true
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: 1.0.2
google_maps_flutter: 1.2.0
google_map_location_picker: 4.1.6
mvc_pattern: 6.6.4+2
global_configuration: 2.0.0-nullsafety.0
html: 0.14.0+4
shared_preferences: 2.0.5
flutter_html: ^1.2.0
flutter_svg: ^0.19.3
location: 3.0.2
webview_flutter: 1.0.7
url_launcher: 6.0.2
firebase_messaging: 7.0.3
cached_network_image: 2.5.0
fluttertoast: 8.0.1-nullsafety.0
flutter_staggered_grid_view: 0.4.0-nullsafety.3
intl_utils: 1.9.0
carousel_slider: 4.0.0-nullsafety.0
cloud_firestore: 0.14.4
firebase_auth: 0.18.4+1
firebase_core: 0.5.3
dev_dependencies:
flutter_test:
sdk: flutter
dependency_overrides:
intl: 0.17.0
http: 0.13.2
flutter:
assets:
- assets/cfg/
- assets/img/
fonts:
- family: ProductSans
fonts:
- asset: assets/fonts/ProductSans-Thin.ttf
weight: 100
- asset: assets/fonts/ProductSans-Thin.ttf
weight: 200
- asset: assets/fonts/ProductSans-Light.ttf
weight: 300
- asset: assets/fonts/ProductSans-Regular.ttf
weight: 400
- asset: assets/fonts/ProductSans-Medium.ttf
weight: 500
- asset: assets/fonts/ProductSans-Bold.ttf
weight: 600
- asset: assets/fonts/ProductSans-Black.ttf
weight: 700
- asset: assets/fonts/ProductSans-Black.ttf
weight: 800
- asset: assets/fonts/ProductSans-Black.ttf
weight: 900
flutter_intl:
enabled: true
Try running 'Flutter pub upgrade'. You can type the command in your terminal window in Android Studio. Or if you open your pubspec.yaml file, you'll see the Pub upgrade command along the top, next to Pub get. Running the command will get the newest versions of your libraries and will probably resolve the issue.
If that doesn't work, then try running 'Flutter pub outdated' and 'Flutter pub upgrade --major-versions'.
Edit:
This returns 'Pub get' without error:
cupertino_icons: ^1.0.3
google_maps_flutter: ^2.0.6
#google_map_location_picker: 4.1.7
mvc_pattern: ^7.4.0
global_configuration: ^2.0.0-nullsafety.1
html: ^0.15.0
shared_preferences: ^2.0.6
flutter_html: ^2.1.0
flutter_svg: ^0.22.0
location: ^4.3.0
webview_flutter: ^2.0.9
url_launcher: ^6.0.9
firebase_messaging: ^10.0.3
cached_network_image: 2.5.0
fluttertoast: ^8.0.7
flutter_staggered_grid_view: ^0.4.0
intl_utils: 2.3.0
carousel_slider: ^4.0.0
cloud_firestore: ^2.3.0
firebase_auth: ^2.0.0
firebase_core: 1.3.0
I had to comment out google_map_location_picker because that is an outdated library. The author of that library appears to have abandoned the project. google_maps_place_picker might be a suitable alternative.

flutter test from sdk is forbidden

I downloaded project from github and tried to run the project but it requires Get Dependencies and when I press Pub Get to for dependencies I receive the following error:
Because every version of flutter_test from sdk depends on path 1.7.0 and fstore depends on
path 1.6.4, flutter_test from sdk is forbidden.
So, because fstore depends on flutter_test any from sdk, version solving failed.
pub get failed (1; So, because fstore depends on flutter_test any from sdk, version solving
failed.)
Here is pubsbec.yaml file:
name: fstore
description: Mobile commerce app by Flutter
version: 1.6.5+33
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
logs:
git: https://github.com/pq/logs
flutter:
sdk: flutter
http: 0.12.0+4
html_unescape: 1.0.1+3
provider: 4.0.4
after_layout: 1.0.7+2
font_awesome_flutter: 8.7.0
path: 1.6.4
vector_math: 2.0.8
carousel_pro: 1.0.0
flutter_widget_from_html: 0.3.2+1
configurable_expansion_tile: 1.0.0
timeago: 2.0.26
share: 0.6.3+6
validate: 1.7.0
country_pickers: 1.2.0
shared_preferences: 0.5.6+3
firebase_messaging: 6.0.12
firebase_analytics: 5.0.11
transparent_image: 1.0.0
pull_to_refresh: 1.5.8
localstorage: 3.0.1+4
notification_permissions: 0.4.4
flare_splash_screen: 3.0.1
rate_my_app: 0.6.0+2
page_indicator: 0.3.0
extended_image: 0.7.1
intro_slider: 2.2.9
url_launcher: 5.4.2
firebase_core: 0.4.4 # keep these version as there is new issue
firebase_auth: 0.15.3 # with the latest firebase https://github.com/FirebaseExtended/flutterfire/issues/2084
flutter_webview_plugin: 0.3.10+1
connectivity: 0.4.8+2
random_string: 2.0.1
google_maps_flutter: 0.5.24+1
place_picker: 0.9.11
cached_network_image: 2.0.0
image_picker: 0.6.3+4
uuid: 2.0.4
uni_links: 0.2.0
flutter_staggered_grid_view: 0.3.0
device_apps: 1.0.9
auto_size_text: 2.1.0
flutter_swiper: 1.1.6
flutter_widgets: 0.1.12
video_player: 0.10.8+1
flutter_spinkit: 4.1.2
percent_indicator: 2.1.1+1
animated_text_kit: 2.0.0
wave: 0.0.8
http_auth: 0.2.9
firebase_admob: 0.9.1
facebook_audience_network: 0.5.0
pin_code_fields: 2.4.0
flutter_facebook_login: 3.0.0
webview_flutter: 0.3.19+9
rubber: 0.4.0
flutter_localizations:
sdk: flutter
custom_splash: 0.0.2
apple_sign_in: 0.1.0
google_sign_in: 4.1.4
google_fonts: 0.3.10
flutter_statusbarcolor: 0.2.3
app_settings: 3.0.1
razorpay_flutter: 1.1.2
animated_splash: 1.0.0
firebase_database: 3.1.3
event_bus: 1.1.1
country_code_picker: 1.3.6
flutter_typeahead: 1.8.0
flash: 1.2.3
dev_dependencies:
flutter_launcher_icons: 0.7.4
flutter_test:
sdk: flutter
pedantic: 1.8.0+1 # Analysis
I tried already flutter upgrade but it did not work, is there any solution for this problem because
I have found the solution to this problem, you can use both versions of the path dependency through override_dependency, which will satisfy the requirnments.
Try Following solution:
dependencies:
flutter:
sdk: flutter
dio: ^3.0.9
hive_flutter: ^0.3.0+2
hive: ^1.4.1+1
path: ^1.7.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
dependency_overrides:
path: ^1.6.4
dev_dependencies:
flutter_test:
sdk: flutter
hive_generator: ^0.7.0+2
build_runner: ^1.10.0
You can also just simply replace 1.7.0 with 1.6.4 as the error says.

Categories

Resources