2

Error:java.io.FileNotFoundException: C:\Users\Petrusic\AndroidStudioProjects\askramarnovi.gradle\2.2.1\taskArtifacts\cache.properties (The system cannot find the file specified)

C:\Users\Petrusic\AndroidStudioProjects\askramarnovi.gradle\2.2.1\taskArtifacts\cache.properties (The system cannot find the file specified)

bukeleza
  • 21
  • 1
  • 1
  • 4
  • See @user3484700 answer in this link.http://stackoverflow.com/questions/32024954/cache-properties-the-system-cannot-find-the-file-specified. It solves this problem. – SajithK Sep 22 '15 at 09:37

9 Answers9

5

I've already tried simply to delete gradle folder. then restarted Android Studio and the problem solved

5

Look for a cache.properties.lock file, delete it and rebuild project

ssbljk
  • 109
  • 1
  • 5
3

cache.properties (The system cannot find the file specified)

To fix this problem go to :

 C:\Users\[Usuario]\.gradle\caches\

Delete folders \2.4 and \2.8

introducir la descripción de la imagen aquí

Restart Android Studio y Sync project with Gradle Files!.

Jorgesys
  • 124,308
  • 23
  • 334
  • 268
2

There is probably something wrong with your cached dependencies:

Try to rebuild your project:

gradle clean build --refresh-dependencies
devz
  • 2,629
  • 2
  • 31
  • 37
2

There is very easy solution for this problem just goto File in the menu bar and say Invalidate Cache and Restart it will be all right..

I hope this might solve your problem because it worked for me.

Anirudh R.Huilgol.
  • 839
  • 1
  • 15
  • 16
1
  1. Delete yourproject/.gradle directory
  2. goto File in the menu bar and say Invalidate Cache and Restart it will be all right..
0

First copy the scripts folder (Which is shown in the studio) C:\Users\[User name]\.gradle\caches\2.10\scripts to some other place

then Delete all cache.properties.lock files from your C:\Users\[User name]\.gradle\caches\2.10\scripts (Which file is shown in studio)

For every deletion Rebuild Project (Build -> Rebuild Project) if the studio showing the error in other properties.lock file means delete those all and rebuild project

After this you may get error like No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'

then include

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
}

and synch (This option is at top of the build.graddle)

Bahu
  • 1,516
  • 2
  • 28
  • 49
0

It is very simple just goto file > invalidiate caches/restart > pop-up will open then click on "invalidiate and restart" button

0

If you receive error related to cache just check & make sure you have put org.gradle.unsafe.configuration-cache=false

androminor
  • 322
  • 1
  • 13