flutter 升级后报错Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Flutter Jul 07, 2020
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.                                 
> Could not resolve all task dependencies for configuration ':app:DebugCompileClasspath'.                      
   > Could not resolve androidx.lifecycle:lifecycle-common:{strictly 2.1.0}.                                       
     Required by:                                                                                                  
         project :app            
         ......

一般出现在Flutter升级后

打开科学上网-复制终端代码命令-重新run一遍就好了