Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 351 Vote(s) - 3.42 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Android Studio : Could not set process working directory to "new directory"

#1
I am doing a project using Android Studio. After change the directory to another place. I got an Error "Could not set process working directory to [my old directory path] : could not setcwd() (errno 2: No such file or directory)"
Reply

#2
Restart Android studio and open your project from the new directory
Reply

#3
Follow below steps.

1) Close android studio.
2) Delete the .idea folder on your project folder.
3) Start android studio and open your project.
worked for me.
Reply

#4
I solved it with `Invalidate Caches / Restart`
Reply

#5
It can be due to a number of reasons.
The solutions below are proven to solve it

1. Close android studio. Delete the .idea folder on your project folder.

2. On the menu File select Invalidate Caches and restart

3. Check if your project root folder has any invalid chars such as whitespace. If so, close Android Studio and rename the root folder.
Reply

#6
This method working for me always
1. Invalid cache
2. Rebuild project
3. Delete the .idea folder on your project folder.
4. Sync project with gradle file.

But those all solution workes once after new restart of pc need to do again
Reply

#7
I'll post the most embarrassing answer here.

I was running the Gradle commands from the wrong directory :).
Reply

#8
Gradle and IntelliJ tend to confuse each other when you move project modules and dependencies around; there is no way to refactor cleanly.

This method helped me but do note that you will lose your local changes in change-list unless you save them

1. Delete all your .iml folders
2. Delete all your .gradle folders
3. Delete `~/.gradle/caches` (or `%UserProfile%/.gradle/caches` on Windows)
4. Invalidate / Clear Cache & Restart
5. Open Project
6. Close IntelliJ / Android Studio Again
7. Open Project Again

Reply

#9
For me the issue was a typo in the folder name.

In order for android studio to recognize a folder as a module, that folder must be included in the `settings.gradle.kts` at the root level. If either the folder or the include have a typo, then Android Studio will fail to recognize the module as such, and trying to run it will result in the aforementioned error.

**Faulty sample:**
* Folder name: "desktop"
* Include statement: `include(":dekstop") `


**Fix:**

* Folder name: "desktop"
* Include statement: `include(":desktop")`
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through