Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
387 views
in Technique[技术] by (71.8m points)

java - Error:Timeout waiting to lock buildscript class cache for build file when change minSdkVersion

I try to change minSdkVersion in build.gradle (Module: app) in Android Studio and get next error:

Error:Timeout waiting to lock buildscript class cache for build file 'E:pathtoprojectappuild.gradle' (C:UsersAdministrator.gradlecaches2.2.1scriptsuild_f00bwdji3qxl7urq5chsbakgvProjectScriptuildscript). It is currently in use by another Gradle instance.
Owner PID: unknown
Our PID: 4592
Owner Operation: unknown
Our operation: Initialize cache
Lock file: C:UsersAdministrator.gradlecaches2.2.1scriptsuild_f00bwdji3qxl7urq5chsbakgvProjectScriptuildscriptcache.properties.lock

What is it error? How to change minSdkVersion ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This sounds like it's related to https://issues.gradle.org/browse/GRADLE-2795.

The easiest way to solve this will be to delete everything under C:UsersAdministrator.gradlecaches. There is a cache.properties.lock that is holding a global lock which is preventing you from running your script.

For Mac OSX the folder is located in ~/.gradle/caches. The Android Studio should show the proper path to the file which is causing the lock anyway.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...