Error in building project in Android Studio

后端 未结 10 2216
生来不讨喜
生来不讨喜 2020-12-11 14:56

Freshly Installed Android Studio and started new android project. When tried to run it. Got this error from Gradle

Error:Could not open init         


        
10条回答
  •  伪装坚强ぢ
    2020-12-11 15:44

    I'm having the same problem and deleting just the cache.properties.lock is not enough.

    The solution, as pointed before, is deleting the cache.properties.lock file, but not only in the folder pointed by Android Studio. I needed to remove every lock file inside .gradle\caches\VERSION.

    So, I created a small .bat file with this:

    del /s cache.properties.lock
    

    Add this file to .gradle\caches\VERSION\ and run it. My Android Studio stopped complaining afterwards.

    Hope it helps!

提交回复
热议问题