2

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.

Pa3k
  • 31
  • 2
  • Duplicate of http://stackoverflow.com/questions/37632342/gradle-could-not-create-an-instance-of-type-com-android-build-gradle-internal-d – stefan222 Jun 29 '16 at 11:51

1 Answers1

0

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 (e.g. D:\android\ based on this instruction http://www.littlecpu.com/android-studio-c-drive)

Pa3k
  • 31
  • 2