You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows 10下Android Studio导入项目时‘Can't start Git:git.exe’错误修复求助

Fixing "Can't start Git:git.exe" Error in Android Studio (Windows 10)

Hey there, let's work through this frustrating error you're hitting when importing projects into Android Studio on Windows 10. I've dealt with this exact issue a few times, so here are the step-by-step fixes that usually resolve it:

  • First, confirm Git is installed and Android Studio can locate it

    • If you haven't installed Git yet, grab the latest version for Windows and run the installer. During setup, make sure to select the option "Git from the command line and also from 3rd-party software" — this ensures Android Studio can access Git properly.
    • Open Android Studio, head to File > Settings > Version Control > Git. Click the browse button (...) next to the "Path to Git executable" field, and navigate to git.exe — it's typically at C:\Program Files\Git\bin\git.exe or C:\Program Files (x86)\Git\bin\git.exe. Hit "Test" to verify the path works.
  • Check if Git is added to your system PATH

    • Right-click "This PC" > Properties > Advanced System Settings > Environment Variables.
    • Under "System variables", find the PATH variable, click "Edit", and add the path to Git's bin folder (e.g., C:\Program Files\Git\bin).
    • Restart your computer and launch Android Studio again to apply the changes.
  • Invalidate Android Studio's cache and restart

    • Cached settings can sometimes cause weird conflicts. Go to File > Invalidate Caches.... Check the box for "Invalidate and Restart", then confirm. Once Studio boots back up, try importing your project again.
  • Verify folder permissions for Git

    • Navigate to the Git installation folder (usually C:\Program Files\Git), right-click it > Properties > Security.
    • Make sure your user account has "Read & execute", "List folder contents", and "Read" permissions enabled.
    • Alternatively, try launching Android Studio as an administrator (right-click the Studio shortcut > "Run as administrator") and see if the error clears up.
  • Reinstall Git as a last resort

    • If none of the above works, uninstall Git from your system, delete any leftover Git folders (like C:\Program Files\Git), then download and reinstall the latest version. Double-check the installation options to ensure command-line access is enabled, then reconfigure the path in Android Studio.

内容的提问来源于stack exchange,提问作者Elackya

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:53:46