2

Hi Am trying to configure Jenkins in android studio. I followed this link

and i installed Jenkins in MAC system and verified with my localhost to check its running perfectly or not(as mentioned in the above link).

I have added following line in my project(root) dependency.

classpath 'org.robolectric:robolectric-gradle-plugin:1.0.1'

My updated project .gradle file is

 dependencies {
    classpath 'com.android.tools.build:gradle:2.1.2'
    classpath 'org.robolectric:robolectric-gradle-plugin:1.0.1'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

No issues while sync project .gradle file. 

But the problem starts after updating(adding robolectric) app .gradle file

apply plugin: 'com.android.application'
apply plugin: 'org.robolectric'

this gives me the following error message

Gradle 'CreatrixAndApp' project refresh failed
Error:The Android Gradle plugin 2.1.2 is not supported.

this is my project root .gradle file

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'
        classpath 'org.robolectric:robolectric-gradle-plugin:1.0.1'
    }
}


allprojects {
    repositories {
        jcenter()
    }
}

this is my app .gradle file

apply plugin: 'com.android.application'
apply plugin: 'org.robolectric'

buildscript {

    repositories {
        mavenCentral()
    }

    dependencies {
         classpath 'com.android.tools.build:gradle:2.1.2'
    }
}


repositories {

    mavenCentral()

    maven {
       url "${System.env.HOME}/.m2/repository"
    }

    flatDir {
       dirs 'libs'
    }

}

android {

    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId 'com.creatrixhrm'
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 20160615
        versionName "1.6.0"
        multiDexEnabled true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'),     'proguard-rules.pro'
        }
    }

    productFlavors {
    }

    dexOptions {
        javaMaxHeapSize "4g"
        preDexLibraries = false
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

}


dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':photoViewerLibrary')
    compile project(':multipleImagePick')
    compile(name: 'creatrixone1_1', ext: 'aar')
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:cardview-v7:23.3.0'
    compile 'com.android.support:recyclerview-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:support-vector-drawable:23.3.0'
    compile 'com.android.support:animated-vector-drawable:23.3.0'
    compile 'com.koushikdutta.ion:ion:2.1.7'
    compile 'mbanje.kurt:fabbutton:1.2.2@aar'
    compile 'com.google.code.gson:gson:2.4'
    compile 'com.android.support:support-v4:23.3.0'
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
    compile 'io.jsonwebtoken:jjwt:0.6.0'
}

I tried following this suggestion, but no use

can anyone tell me where i am making mistake

Anbarasu Chinna
  • 975
  • 9
  • 28

0 Answers0