简体   繁体   中英

Android project in Jenkins build

I have an Android project with more modules. When I tried to build this project in Android Studio 2.1 this, is working fine, but I when I tried to build with Jenkins I get this error:

* 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 file of this module (mylibrary):

apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'

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

Gradle plugin:

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

What can by a problem? Thanks for comments.

Problem was that Jenkins tried to create files under C:\\users\\administrator.android\\ , but jenkins has no permission to do this.

Solution: moved all android parts to one (non default) folder (eg D:\\android\\ based on this instruction http://www.littlecpu.com/android-studio-c-drive )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM