<分区>
我真的很困惑为什么这个文件被锁定了。
它只锁定了一个特定的项目,其他项目没问题,所以可能与我的构建文件有关,但是到目前为止它们一直运行良好。
"Error:Timeout waiting to lock cp_proj class cache for build file 'D:\Users\RU112828\Development\NavX Fuel - Trunk\Fuel-TestApp\test\build.gradle' (D:\Users\user\.gradle\caches\2.8\scripts\build_64jc2uvb9pu0rruzfn4eaqpd1\cp_proj). It is currently in use by another Gradle instance.
Owner PID: unknown
Our PID: 7444
Owner Operation: unknown
Our operation: Initialize cache
Lock file: D:\Users\RU112828\.gradle\caches\2.8\scripts\build_64jc2uvb9pu0rruzfn4eaqpd1\cp_proj\cache.properties.lock"
只有一个构建正在进行,没有同时构建。经过昨天的大量摆弄之后,我设法清除了缓存,它又恢复了生机。但是今天已经不是这种情况了,清除缓存后它仍然阻塞。
buildscript {
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0+'
}
}
apply plugin: 'com.android.application'
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
androidTestCompile fileTree(dir: 'libs', include: 'robotium-solo-5.5.3.jar')
// compile 'com.android.support:appcompat-v7:23.1.1'
compile files('libs/robotium-solo-5.5.3.jar')
}
android {
compileSdkVersion 'android-15'
buildToolsVersion '23.0.2'
android {
defaultConfig {
minSdkVersion 15
}
lintOptions {
abortOnError false
}
sourceSets
{
androidTest
{
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
}
task assembleDebug(overwrite: true) {}
task copyTask(type: Copy) {
from 'D:/Users/RU112828/Development/app/myapp.apk'
into 'build/outputs/apk/'
rename {
'test-debug.apk'
}
exec { //TODO this is commented out when we do not need a fresh install, when running start up tests then we should un-comment this
//Force app to uninstall before then being installed.
commandLine 'cmd', '/c', 'adb', 'uninstall', 'com.my.package'
}
}
assembleDebug.dependsOn copyTask
该构建脚本由 Robotium Recorder 生成,然后我添加了调整以在 assembleDebug 阶段强制卸载应用程序。
谁能告诉我一些关于为什么这个文件被锁定的见解。
谢谢