(The system cannot find the file specified) –

Development issue/problem:

I just started Android Studio 1.3 sdk 24 and it works well so far. I get this error message and I delete this cache file, but now I get this error message :

I am trying the file/cache/restart…. and restore the project, but I’m still getting this error message. How can I solve this problem?

How can I solve this problem?

Solution 1:

There is no need to uninstall all .gradle folders and reinstall Android Studio.

I have the latest version of Android Studio and I came across this problem, the only thing that helped me:

  1. Navigate to C:Usersuser.gradlecaches2.x
  2. Copy and paste the scripts in the folder to a safe place in case something goes wrong.
  3. Delete the scripts in this folder and the scripts stored in the C:Usersuser.gradlecaches2.x folder.
  4. Synchronize the project with the Gradle files and you’re done.

When synchronizing the project, Android Studio creates new cache files.

You must also remove buildOutputCleanup.lock from ProjectLocation/.gradle/buildOutputCleanup if the 4 steps above do not work.

It worked for me. I hope it works for you, too.

Solution 2:

It is not possible to reinstall Android Studio!

To solve the problem: (the system cannot find the specified file)

Go to:

C:Users [user].gradlecaches

Delete folders 2.4 and 2.8

Reboot Android Studio!

Solution 3:

There is no need to reinstall Android Studio or uninstall all .gradle folders.

I’ve reinstalled the latest version of Android Studio and I’ve always had this problem. In my case, this led me to rename the Android Projects folder on my desktop.

All you have to do is

1-Navigate to C:Usersuser_name.gradlecaches2.4 or (2.8 if there is an error)
2-Copy the folder 2.4 or 2.8 and put it in a safe place, only if something has gone wrong this
3-Delete puts this error folder out of the C:Usersuser.gradlecaches2.4 (or 2.8) folder
4-Close Android Studio and restarts it.

When you restart, your project is synchronized and Android Studio creates new cached files.

It worked for me. I hope that’s okay with you….

Solution 4:

I have the same problem, I am removing .gradle from C:Usersuser.gradlecaches2.4 and also from my application.

Of course, close and restart Android Studio.

Solution No 5:

Nothing needs to be reinstalled.

Just delete the 2.4 and 2.8 folders in the C:Usersuser.gradlecaches folder and open the android studio again. New money files are being created, so the buildup should be successful now.

Solution No 6:

I’ve found a solution to my question, but I don’t know if it’s the best solution:

I removed all the .gradle folders from the custom library and reinstalled android, and it all worked.

Solution No 7:

A simple solution. Create an empty file below the path specified in the error log. The mistake must go away.

Solution No 8:

As mentioned in the examples above, I have tried to solve the problem by taking additional measures:

  1. Navigate to the corresponding folder C:Usersuser.gradlecaches2.14.1
  2. Copy the Scripts folder and the Markup Scripts folder to a safe place.
  3. Now, REMOVE the scripts and script rescripts mapped to C:Usersuser.gradlecaches2.14.1.
  4. Finally, try to synchronize the distribution.
  5. Android Studio will ask you to update the Gradle plugin. Click on Update Completion.

(Unless you try to restart the Android Studio IDE completely).

I mean, it’s done for me…. ! !!!

Solution No 9:

Removing the script folder and recreating the project solves this problem.

Solution No 10:

I don’t know why a big developer like Google can’t handle this problem itself, it’s very easy to remove the cache folder and restore it programmatically.
In any case, go to C:Usersuser.gradlecaches and open the folder with the latest version and then delete the folder with the scripts.
Go to the android studio and synchronize the project.

Good luck!

Related Tags:

gradle build cache,secret properties not found,caches are locked android studio,found wrong type for build file in cache,the system cannot find the file specified android studio,could not open cache directory workermain gradle,gradle clear cache,java io filenotfoundexception gradle caches,org gradle cache cacheopenexception could not open cache directory workermain,buildoutputcleanup lock