Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not setcwd() (errno 2: No such file or directory)

Tags:

android

gradle

After running my project I encounter following error in android studio.

Do you know the reason?

10:04:15 PM: Executing task 'installDebug'...

Could not set process working directory to '/Users/mahdir/.gradle/daemon/4.8/:app': could not setcwd() (errno 2: No such file or directory)
10:04:15 PM: Task execution finished 'installDebug'.
like image 546
Mahdi Rajabi Avatar asked Sep 29 '18 18:09

Mahdi Rajabi


2 Answers

I guess the module is not properly selected in the run/debug configuration. Before you try the whole unlink/link roundtrip just do:

  1. Open the Run/Debug Configuration dialog for the config in question by
  • clicking on the dropdown to the top left (see Run/Debug Configuration Dropdown)
  • clicking on Edit Configurations... (see Configuration Dialog)
  1. Click on the icon right next to the Gradle project field and re-select the module of your choice (see Gradle project selection)
  2. Try running the run/debug configuration again.
like image 149
Björn Kahlert Avatar answered Sep 18 '22 19:09

Björn Kahlert


For me

  1. Close the project and remove it from recent project list.
  2. Go to the project directory and remove .gradle & .idea directory.
  3. Import this as existing project again.
like image 41
V-9-द Avatar answered Sep 17 '22 19:09

V-9-द