【问题标题】:Android project in Jenkins buildJenkins 构建中的 Android 项目
【发布时间】:2016-05-04 07:19:30
【问题描述】:

我有一个包含更多模块的 Android 项目。当我尝试在 Android Studio 2.1 中构建这个项目时,它工作正常,但是当我尝试使用 Jenkins 构建时,我得到了这个错误:

* Where: Build file 'D:\Jenkins\workspace\MyProject\mylibrary\build.gradle' line: 1

* What went wrong: A problem occurred evaluating project ':mylibrary'.
> Failed to apply plugin [id 'com.android.library']
   > Could not create an instance of type com.android.build.gradle.internal.dsl.SigningConfig_Decorated.

这个模块的build.gradle文件(mylibrary):

apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 21
        versionName "1.0"
        versionCode 3
    }
       .
       .
       .            
}

Gradle 插件:

classpath 'com.android.tools.build:gradle:2.1.0'

有什么问题?感谢 cmets。

【问题讨论】:

标签: android jenkins android-gradle-plugin android-studio-2.1


【解决方案1】:

问题是 Jenkins 试图在 C:\users\administrator.android\ 下创建文件,但 jenkins 没有这样做的权限。

解决方案: 将所有 android 部件移动到一个(非默认)文件夹(例如 D:\android\ 基于此指令http://www.littlecpu.com/android-studio-c-drive

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-14
    • 2012-07-14
    • 2013-11-12
    • 2022-10-06
    相关资源
    最近更新 更多