Stella
Stella

Reputation: 1868

Android : Fatal error Not a git repository

I am facing the below error from Android studio project.

Error:Process 'command 'git'' finished with non-zero exit value 128

I was downloading source from VCS->Git, and cancelled it in the middle. Then I downloaded the same source locally and 'open existing android studio project' option. Once this project is opened in studio, I couldn't run it at all. It is still throwing error as below.

Error:fatal: Not a git repository (or any of the parent directories): .git

FAILURE: Build failed with an exception.

  • Where: Script '/Users/.../functions.gradle' line: 19

  • What went wrong: A problem occurred evaluating project '..'.

    Process 'command 'git'' finished with non-zero exit value 128

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

I tried cleaning the project and run, observed the same error.

I again downloaded the same project from VCS->Git completely, still observing the same error either cases.

Could someone guide me how to solve this?

Upvotes: 0

Views: 1445

Answers (1)

thushcapone
thushcapone

Reputation: 162

You can from the terminal, access the root of your projet then do:

git init

It will initialise your project as a git project, then try again and tell us what you have

Upvotes: 2

Related Questions