我已经在我的git repo中从github导入了一个代码,并且从那里我已经在Android Studio中导入了该项目,但是在gradle sync之后的gradle构建之后它出现了这个错误: -
Error:(12, 0) CreateProcess error=2, The system cannot find the file specified <a href="openFile:C:\Users\Vikas\ODK\collect\collect_app\build.gradle">Open File</a>
任何人都可以快速帮助。 这是我的build.gradle文件
if ((new File(gradle.local)).exists()) {
apply from: gradle.local
} else {
apply from: gradle.remote
}
applicationScripts.each {
apply from: it
}
apply plugin: 'com.android.application'
com.android.ddmlib.DdmPreferences.setTimeOut(60000)
android {
// The following are set in the common.gradle file
compileSdkVersion(compileVersion)
buildToolsVersion(buildTools)
defaultConfig {
applicationId("org.odk.collect.android")
minSdkVersion(9)
targetSdkVersion(9)
versionCode(1061)
versionName("1.4.10")
}
productFlavors {
demo {
}
master {
}
snapshot {
}
uitest {
}
}
signingConfigs {
release {
if (shouldSign) {
storeFile file(signStoreFilePath)
storePassword signStorePass
keyAlias signKeyAlias
keyPassword signKeyPass
}
}
}
buildTypes {
release {
minifyEnabled(minify)
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
if (shouldSign) {
signingConfig signingConfigs.release
}
}
debug {
debuggable(true)
testCoverageEnabled(testCoverage) // Allows AndroidTest JaCoCo reports to be generated
}
}
packagingOptions { // Pick first occurrence of any files that cause conflicts, as defined in common.gradle
packageList.each {
pickFirst it
}
}
compileOptions {
sourceCompatibility javaVersion
targetCompatibility javaVersion
}
}
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor(0, 'seconds')
cacheChangingModulesFor(0, 'seconds')
}
transitive = true
}
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.google.android.gms:play-services:4.1.32'
// Testing-only dependencies
testCompile 'junit:junit:4.12'
}