An error occurred while resolving packages:
  Project has invalid dependencies:
  com.unity.2d.tilemap.extras: No 'git' executable was found. Please install Git on your     system then restart Unity and Unity Hub

 

提示git无法找到所以导致无法加载manifest.json中添加外部库

Project has invalid dependencies No git executable was found

Project has invalid dependencies No git executable was found

解决方法:

下载并安装Git

我这里默认安装后的路径如下C:\Program Files\Git

Project has invalid dependencies No git executable was found

右键我的电脑->点击属性->点击高级系统设置->点击环境变量

Project has invalid dependencies No git executable was found

Project has invalid dependencies No git executable was found

进行设置git的path路径

Project has invalid dependencies No git executable was found

点击新建创建如下变量Git_Path值输入安装的根目录

Project has invalid dependencies No git executable was found

选择path进行编辑在最后添加参数;%Git_Path%;%Git_Path%\cmd 确定进行保存

Project has invalid dependencies No git executable was found

Win+R 输入cmd进入cmd中输入git --version 出现如下结果表示设置成功

Project has invalid dependencies No git executable was found

之后重启hub以及项目后就可正常引入

相关文章: