Issue 1:
Note: I know this issue already exists in raised issue but I found it unresolved. Please don't close it as I included troubleshooting suggested by other threads too along with all outputs and snapshots. so its not a duplicate issue.

I am using Windows 8.1 64bit

having 7z and git installed on my system

environment set properly

As per getting started instructions to install flutter on windows, I cloned flutter using the following command in c:\android directory and get a c:\android\flutter directory

git clone -b beta https://github.com/flutter/flutter.git

set environment c:\android\flutter\bin

then I make a folder on the desktop called test and open PowerShell and CD to that folder and run following command

flutter doctor

It says Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... repeatedly as following

Checking Dart SDK version...
Downloading Dart SDK from Flutter engine ead227f118077d1f2b57842a32abaf105b573b8a...
Unzipping Dart SDK...
Updating flutter tool...
The system cannot find the path specified.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Waiting for 0 seconds, press CTRL+C to quit ...
The system cannot find the path specified.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

I searched on google leading different issue pages and forums to resolve the issue. tried deleting cache directory and repeating flutter doctor command also didn't find any $cachePath folder anywhere in my system.

tries a solution suggested on the issue #12666 to cd into flutter\packages\flutter_tools and in there execute ..\..\bin\cache\dart-sdk\bin\pub.bat upgrade --verbosity=error --no-packages-dir

but I guess it didn't work as there is nothing in my C:\android\flutter\bin\cache\dart-sdk directory and gives following errors

..\..\bin\cache\dart-sdk\bin\pub.bat : The term '..\..\bin\cache\dart-sdk\bin\pub.bat' is not recognized as the name
of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:1
+ ..\..\bin\cache\dart-sdk\bin\pub.bat upgrade --verbosity=error --no-p ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (..\..\bin\cache\dart-sdk\bin\pub.bat:String) [], CommandNotFoundExcepti
on
+ FullyQualifiedErrorId : CommandNotFoundException

I tried to manually download dart-sdk and extract it inside C:\android\flutter\bin\cache\dart-sdk directory but it starts giving dependency error as following

Updating flutter tool...
Incompatible version constraints on async:
- flutter_tools depends on version 2.0.4
- pub itself depends on version >=1.8.0 <2.0.0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Waiting for 0 seconds, press CTRL+C to quit ...
^CTerminate batch job (Y/N)? y

I tried uninstalling and re-installing everything again but nothing works.

I noticed on executing flutter doctor command I do see a dart-sdk-windows-x64.zip file get downloaded inside flutter\bin\cache directory but it gets deletes itself soon after downloading and didn't get extracted.

Results of flutter run, flutter analyze and flutter doctor -v are same

Updating flutter tool...
The system cannot find the path specified.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Waiting for 3 seconds, press CTRL+C to quit ...
Terminate batch job (Y/N)? y

in case dart-sdk added manually following are the outputs of all the above commands i.e. flutter run, flutter analyze and flutter doctor -v

Updating flutter tool...
Incompatible version constraints on async:
- flutter_tools depends on version 2.0.4
- pub itself depends on version >=1.8.0 <2.0.0
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Waiting for 0 seconds, press CTRL+C to quit ...
^CTerminate batch job (Y/N)?

Do anyone find any prominent solution to this issue? If yes please share it.

Issue 2:
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building ExpansionPanelList:
flutter: 'package:flutter/src/material/mergeable_material.dart': Failed assertion: line 443 pos 18:
flutter: '_children[j] is MaterialGap': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2 _MergeableMaterialState.didUpdateWidget (package:flutter/src/material/mergeable_material.dart)
flutter: #3 StatefulElement.update (package:flutter/src/widgets/framework.dart:3784:58)
flutter: #4 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #6 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #7 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #8 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #9 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #11 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #12 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #13 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #14 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #15 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #16 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #17 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #18 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #19 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #20 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #21 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #22 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #23 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #24 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #25 SliverMultiBoxAdaptorElement.updateChild (package:flutter/src/widgets/sliver.dart:744:36)
flutter: #26 SliverMultiBoxAdaptorElement.performRebuild (package:flutter/src/widgets/sliver.dart:702:34)
flutter: #27 SliverMultiBoxAdaptorElement.update (package:flutter/src/widgets/sliver.dart:671:7)
flutter: #28 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #29 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #30 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #31 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #32 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #33 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #34 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #35 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4379:32)
flutter: #36 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4769:17)
flutter: #37 _ViewportElement.update (package:flutter/src/widgets/viewport.dart:192:11)
flutter: #38 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #39 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #40 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #41 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #42 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #43 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #44 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #45 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #46 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #47 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #48 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #49 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #50 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #51 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #52 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #53 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #54 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #55 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #56 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #57 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #58 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #59 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #60 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #61 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #62 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #63 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #64 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #65 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #66 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #67 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #68 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #69 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #70 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #71 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #72 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #73 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4379:32)
flutter: #74 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4769:17)
flutter: #75 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #76 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #77 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #78 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #79 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #80 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #81 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #82 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #83 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #84 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4379:32)
flutter: #85 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4769:17)
flutter: #86 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #87 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #88 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #89 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #90 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #91 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #92 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #93 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #94 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #95 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #96 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #97 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #98 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #99 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #100 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #101 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #102 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #103 StatelessElement.update (package:flutter/src/widgets/framework.dart:3702:5)
flutter: #104 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #105 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4661:14)
flutter: #106 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #107 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #108 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #109 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #110 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #111 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #112 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #113 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #114 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #115 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #116 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #117 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #118 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #119 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #120 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #121 ProxyElement.update (package:flutter/src/widgets/framework.dart:3909:5)
flutter: #122 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #123 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #124 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #125 StatefulElement.update (package:flutter/src/widgets/framework.dart:3799:5)
flutter: #126 Element.updateChild (package:flutter/src/widgets/framework.dart:2699:15)
flutter: #127 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
flutter: #128 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
flutter: #129 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2242:33)
flutter: #130 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:626:20)
flutter: #131 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
flutter: #132 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #133 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #134 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
flutter: #135 _invoke (dart:ui/hooks.dart:120:13)
flutter: #136 _drawFrame (dart:ui/hooks.dart:109:3)
flutter: (elided 2 frames from class _AssertionError)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════