I can not connect the package to pubspect.yaml geolocation
dependencies:
http: ^0.12.0
flutter:
sdk: flutter
geolocation: ^0.2.1
Appear an error:
[logining] flutter packages get
Running "flutter packages get" in logining...
The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.
Because logining depends on geolocation >=0.1.1 which requires SDK version <2.0.0, version solving failed.
pub get failed (1)
exit code 1
What should I do?
pub.dartlang.org prominently shows that this package is not compatible with Dart 2.
Flutter uses Dart 2 since about 5/2018, so you can't use this package with newer Flutter version.
Related
I want to use open cv and tensorflow for flutter agora sdk on ios, but I dont know how to import it. This is link repo https://github.com/AgoraIO/Flutter-SDK. Anyone can help me ?
Take a look at the example here: https://github.com/AgoraIO-Community/Agora-Flutter-Quickstart
To answer your question specifically, to import the SDK you need to add it to your pubspec.yml file in your Flutter project. This is where all the external packages are added.
dependencies:
flutter:
sdk: flutter
provider: 3.2.0
intl: ^0.15.8
agora_rtc_engine: 1.0.5
permission_handler: ^3.0.0
Depending on your development environment you will then have to prompt Flutter to get the dependencies by running flutter pub get or your IDE (Vscode, etc.) will detect the change and do it for you.
My flutter isn't working any more.
Doesn't matter if I type:
flutter channel dev
flutter doctor
flutter update-packages --force-upgrade
All this commands shows this errror:
Building flutter tool...
Because flutter_tools depends on sockjs_client 0.3.5 which doesn't match any versions, version solving failed.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
What can I do?
You have to revise your pubspec.yaml file to check for the package sockjs_client 0.3.5 which doesn't match any package at official dart packages which is the sole repository to get Dart packages for flutter. Check the name and version again, and if it doesn't match one you have to remove it from pubspec.yaml if you want the build process to be successful.
I am getting an issue trying to compile an application in the flutter dev channel, I have tried with master channel too, but it doesn't work.
I got this issue:
Your application could not be compiled, because its dependencies could not be established.
The following Dart file:
C:\src\flutter\packages\flutter\lib\gestures.dart
...refers, in an import, to the following library:
C:\src\flutter\packages\flutter\lib\src\gestures\lsq_solverno.dart
Unfortunately, that library does not appear to exist on your file system.
I have this YAML file
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
google_sign_in: ^3.0.4
http: ^0.11.3+16
cached_network_image: ^0.4.1
share: ^0.5.2
graphql_flutter: ^0.9.4
camera: ^0.2.1
shared_preferences: ^0.4.3
redux: ^3.0.0
flutter_redux: ^0.5.2
material_design_icons_flutter: ^3.0.3392
vibrate: ^0.0.4
I also tried to run the flutter_gallery project from Flutter GitHub examples, it ran the first time, but now, it indicates the same issue that I am getting with my project.
The correct file name would be
C:\src\flutter\packages\flutter\lib\src\gestures\lsq_solver.dart
instead of
C:\src\flutter\packages\flutter\lib\src\gestures\lsq_solverno.dart
Your Flutter installation is corrupted. You probably accidentally modified a File in the Flutter install directory.
You can run the following command from the Flutter install directory to check
git status
To fix run in the Flutter install directory
git clean -xfd
git stash save --keep-index
git stash drop
git pull
flutter doctor
The Following Package has not been updated:
https://pub.dartlang.org/packages/tts
I am getting the same error.
Is there any way I can update or fix this issue on my side to continue https://pub.dartlang.org/packages/tts#-analysis-tab-
Running flutter packages pub upgrade failed with the following output:
ERR: The current Dart SDK version is 2.1.0-dev.1.0.flutter-69fce633b7.
Because tts requires SDK version >=1.8.0 <=2.0.0, version solving failed.
Add this to pubspec.yaml
dependency_overrides:
tts: ^1.0.1
until tts is updated to support Dart 2 final.
I am trying to implement map_view plugin in my flutter application. Followed the instructions provided in the plugin documentation but failed to install the plugin.
I have added the dependency for map_view plugin to pubspec.yaml as below,
dependencies:
map_view: "^0.0.10"
but after running flutter packages get, I am getting this error
Package uri has no versions that match >=0.11.1 <0.12.0 derived from:
- map_view 0.0.10 depends on version ^0.11.1
pub get failed (1)
How can I solve this?
delete this from the pubspec.yaml and it works:
dev_dependencies:
flutter_test:
sdk: flutter
The plugin developer answers the question here.