The System cannont find the file specified Android

2019-03-01 09:11发布

问题:

Whenever I try to run android application, I receive an error message.

Error:C:\Users\zeshan\.gradle\caches\2.14.1\scripts-remapped\build_6xj57zedh3l90p9pnawvv74i8\8ehwj2mcm8zvm71zyxubaaene\cp_proj57408229\cache.properties (The system cannot find the file specified)

回答1:

  1. Navigate to C:\Users\user_name.gradle\caches\2.14.1 or (2.8 if error in it otherwise)

  2. Copy the folder "2.14.1" or "2.8" and paste it somewhere safe just in case anything went wrong you will place it back

  3. Delete this error folder from the directory C:\Users\user.gradle\caches\2.4\ (or \2.8)

  4. Close the Android studio & restart it.



回答2:

I have the same problem. Just remove .gradle folder, reopen project and rebuild. It helped me.