Error in building project in Android Studio

后端 未结 10 2139
生来不讨喜
生来不讨喜 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:40

    I had similar issues. For me the solution was simply to delete all files inside the folder C:\Users\Dexter.gradle\caches\2.2.1\scripts\ Also i removed VCS configuration from android studio. No need to install new Android Studio to fix the issue.

    0 讨论(0)
  • 2020-12-11 15:42

    I have same problem. just restart your Gradle and then clean your project. i hope this help

    0 讨论(0)
  • 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!

    0 讨论(0)
  • 2020-12-11 15:48

    File -> Invalidate Cache / Restart worked for me.

    0 讨论(0)
提交回复
热议问题