【发布时间】:2016-11-14 02:00:39
【问题描述】:
我正在使用 CircleCI 构建一个 Android 应用程序,并在项目中编译一个 Android 库作为依赖项。但是,我在 CircleCI 构建期间收到以下错误:
A problem occurred configuring project ':aModule'.
> The SDK directory '/home/myname/Android/Sdk' does not exist.
看起来 CircleCI 正在尝试使用一些构建工具来编译模块,但由于它在我的机器上使用绝对路径而失败。如果可能,我将如何配置 CircleCI 以使用 Android SDK 的本地路径?
如果需要,这也是我的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.myapp.app"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "0.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url "http://dl.bintray.com/glomadrian/maven"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.github.medyo:fancybuttons:1.8.1'
compile 'com.github.glomadrian:roadrunner:1.0@aar'
compile 'com.afollestad.material-dialogs:core:0.8.6.1'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.16'
compile 'com.android.support:design:24.0.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.0-beta1'
compile 'joda-time:joda-time:2.9.4'
compile project(':aModule')
}
* 更新:SDK 路径是在我项目的 local.properties 中设置的
【问题讨论】:
-
可能从 repo 中删除 local.properties,对我来说没有上传...stackoverflow.com/a/32149274/1815624
标签: android gradle android-gradle-plugin build-automation circleci