我正在尝试为我的android项目设置Jenkins Job。 Project已在我的本地计算机上成功构建,但在Jenkins上失败并出现以下错误:
配置项目':app'无法评估模块 齐射:配置名称'默认'没找到。
.gitmodules
/*
.mxn-TableStripes(@n, @i: 1) when (@i =< @n) {
@second-row: @n*2;
@sel: ~"@{second-row}n + @{i}";
.Rtable-cell:nth-child(@{sel}) {
background-color: pink;
}
.mxn-TableStripes(@n, (@i + 1));
}
//Param is number of columns
.mxn-TableStripes(4);
*/
app:build.gradle文件
/*
.mxn-TableStripes(@n, @i: 1) when (@i =< @n) {
@second-row: @n*2;
@sel: ~"@{second-row}n + @{i}";
.Rtable-cell:nth-child(@{sel}) {
background-color: pink;
}
.mxn-TableStripes(@n, (@i + 1));
}
//Param is number of columns
.mxn-TableStripes(4);
*/
settings.gradle
[submodule "volley"]
path = volley
url = https://android.googlesource.com/platform/frameworks/volley
project-- build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
signingConfigs {
release {
storeFile file('my-release-key.keystore')
storePassword "******"
keyAlias "release-key"
keyPassword "*******"
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
def fileName = outputFile.name.replace('app-release.apk', "myproject.apk")
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
lintOptions {
abortOnError false
}
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:23.1.0'
}
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.myproject.****"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
signingConfig signingConfigs.release
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
//setProperty("archivesBaseName", "myproject")
}
buildTypes {
release {
minifyEnabled false
shrinkResources true
debuggable false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
packagingOptions {
exclude 'LICENSE.txt'
}
productFlavors {
}
testOptions {
unitTests.returnDefaultValues = true
}
sourceSets { main { java.srcDirs = ['src/main/java'] } }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':volley')
androidTestCompile 'com.android.support.test:runner:0.4'
androidTestCompile 'com.android.support.test:rules:0.4'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile files('libs/json.jar')
testCompile 'org.json:json:20140107'
compile 'com.google.android.gms:play-services-identity:8.3.0'
compile 'com.google.android.gms:play-services-plus:8.3.0'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.github.clans:fab:1.6.1'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.6.0'
compile 'com.google.code.gson:gson:2.2.4'
}
apply plugin: 'idea'
https://android.googlesource.com/platform/frameworks/volley
我已经尝试改变排球和重新训练的路径,但它没有奏效
答案 0 :(得分:0)
该错误消息看起来凌空子模块尚未克隆到工作区中 你不应该手动克隆它,但让詹金斯为你做。
Jenkins默认情况下不会克隆子模块(原因不明),但您可以在作业配置中启用它。在Git部分,选择:
附加行为&gt;添加&gt;高级子模块行为
您还可以在出现的部分中选中“递归克隆子模块”选项,但我不认为凌空需要这个。