I recently updated dart and flutter and after that I am getting this error when trying
Pug Get:
C:\flutter\flutter\bin\flutter.bat --no-color pub upgrade
Resolving dependencies...
Git error. Command: `git fetch`
stdout:
stderr: fatal: unable to connect to github.com:
github.com[0: 140.82.113.3]: errno=Unknown error
exit code: 128
pub finished with exit code 69
Process finished with exit code 69
I am not sure how to fix this? thank you in advance!
There is an issue with the URL to one of the packages in your pubspec. You can see more info on which repository is giving the error by running flutter pub get -v.
This occurred to me as Github has removed git native transport via git://. I had to change my git pubspec entries to
package_name:
git:
url: https://github.com/Sub6Resources/flutter_html.git
flutter pub upgrade
flutter pub get
These command needs to be run from inside a project folder, not from inside the folder flutter\bin\, where the flutter installation lives.
Related
. Hi Everyone
I am getting
Error : Could not find a file named "pubspec.yaml" in git#github.com
Running "flutter pub get" in mobile...
Could not find a file named "pubspec.yaml" in git#github.com
pub get failed (1; Could not find a file named "pubspec.yaml" in git#github.com)
I am using upgrader from git repository in my project
while running pub get I am getting this error
exit code 1
Delete .pub-cache folder from somewhere like /Users//.pub-cache in your device. Then pub-get again.
N.B: If puspec.yaml isn't present in your git repository then be confirm it committed into Git when you make a commit.
I have a problem that I'm trying to solve since last week, I've been searching about this issue and nothing works. I tried to reinstall the flutter and didn't work aswell. The image below is the first issue I have.
Then I went to "Tools -> Flutter -> Flutter Upgrade" and it shows me this message:
C:\src\flutter\bin\flutter.bat --no-color upgrade
fatal: unterminated line in .git/packed-refs: ...
Building flutter tool...
Running pub upgrade...
ProcessException: Process exited abnormally:
fatal: unterminated line in .git/packed-refs: ...
Command: git fetch --tags
Process finished with exit code 1
And when I tap to "Run 'main.dart'", it shows me this message:
fatal: unterminated line in .git/packed-refs: ...
Building flutter tool...
Running pub upgrade...
Running "flutter pub get" in olx...
The current Flutter SDK version is 0.0.0-unknown.
Because carousel_pro 1.0.0 requires Flutter SDK version >=1.2.0 <2.0.0 and no versions of carousel_pro match >1.0.0 <2.0.0, carousel_pro ^1.0.0 is forbidden.
So, because olx depends on carousel_pro ^1.0.0, version solving failed.
pub get failed (1; So, because olx depends on carousel_pro ^1.0.0, version solving failed.)
What could I do to fix these issues?
(Thanks for listening :)
Here the issue is raised due to Flutter SDK version because it is unknown.
These are some steps that I have followed to solve this problem
Run the following git command into your terminal
=> git clone -b master https://github.com/flutter/flutter.git
(this command will clone a flutter folder which contains latest version of Flutter SDK. get more info about SDK - here)
after cloning, we just need to move cloned folder to our default location of flutter SDK.
In my case path of flutter SDK is as follows(ubuntu) -
=> file:///home/bulbul/snap/flutter/common/flutter
I replaced the last flutter folder with the folder which I have cloned before.
then I ran the "flutter --version" command for getting the version of flutter SDK and it gave me the latest version of flutter SDK and the problem was solved.
It worked for me hopefully It will work for you as well.
Happy learning :)
Use the latest flutter SDK then check if the git is available from the command line using git --version. If it's not available from the command line android studio terminal then add git to system path variable and restart android studio.
I'm trying to use the image_picker_web package,(https://pub.dev/packages/image_picker_web) and have put:
image_picker_web: ^1.0.9
in my pubspec.yaml file.
When I try building my project for iOS, I get the following error:
[ios/.symlinks/plugins/image_picker_web/example] flutter pub get
Running "flutter pub get" in example...
Cannot open file, path = '/Users/username/.pub-cache/global_packages/image_picker_web_example/pubspec.lock' (OS Error: No such file or directory, errno = 2)
pub get failed (66; Cannot open file, path = '/Users/username/.pub-cache/global_packages/image_picker_web_example/pubspec.lock' (OS Error: No such file or directory, errno = 2))
exit code 66
With no other code in the project that uses that package, I get the same error. The only way to avoid it is to comment out image_picker_web: ^1.0.9 in my pubspec.yaml and run 'flutter pub get'
I created an issue in their git repo, under the assumption that it's a bug. Is this the case? Are there any workarounds? (perhaps ignoring a package when building for a different platform?)
I ran the following command to fix a similar issue.
Remove all existing caches
sudo rm -rf ~/.pub-cache
Repair the cache
flutter pub cache repair
Reinstall the dependencies
flutter packages get
fatal: not a git repository (or any of the parent directories): .git Could not find a file named "pubspec.yaml" in "C:\Windows\System32". pub get failed (66; Could not find a file named "pubspec.yaml" in "C:\Windows\System32".)
hi everyone
I got this error message every time when I tried to create a flutter project by an android studio or by cmd
I checked flutter doctor command and appear no problems about flutter installation
so any advice about this problem?
[error message when I used android studio 1
flutter doctor message
You can try below steps:
First, you reboot(restart) your PC.
Before opening anything, you delete your flutter folder.
Unzipped a new flutter installation into the same directory.
Inside your project directory You run flutter packages get
Then open the IDE and everything will be working.
Refer flutter issue for more information.
I am unable to update flutter on osX.
When I run:
flutter doctor
I get the following error:
Because flutter_tools depends on xml >=3.5.0 which requires SDK version >=2.3.0 <3.0.0, version solving failed.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
The current Dart SDK version is 2.3.0-dev.0.5.flutter-a1668566e5.
I have not idea how to solve this issue since I cannot issue any flutter commands.
I tried to cd into the flutter/bin directory and do :
git clean -xfd
git stash save --keep-index
git stash drop
git pull
flutter doctor
But this did not solve my issues.
Any ideas ? I don't have sudo rights.