Issue
flutter pub upgrade
Git error. Command: git rev-list --max-count=1 android-x
fatal: ambiguous argument 'android-x': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
pub upgrade failed (server unavailable) -- attempting retry 1 in 1 second...
I’ve tried both stable and beta channels with the same results.
Solution
Found the problem.
I had a package in the pub spec that used a git path and ref:.
The project maintainers had deleted the branch so the ref was no longer valid.
Unfortunately the flutter error gave no hint of the package.
Answered By – Brett Sutton
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0