Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find method jackOptions() for arguments

Hi everyone I'm facing the

Could not find method jackOptions() for arguments [build_ccqj3loj50621uihss8xz3wml$_run_closure1$_closure3$_closure6@24055137] on DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=16, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=25, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=1, versionName=1.0, applicationId=com.vpaliy.flip_concept, testApplicationId=null, testInstrumentationRunner=android.support.test.runner.AndroidJUnitRunner, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig.

issue when I'm trying to clone this repo from Github. I have tried the official doc disable jack and also checked SO link1, link2 but they weren't of much help as I tried to remove the

jackOptions {
    enabled true
}

from the gradle as per the official doc but still the error persists and also tried to invalidate cache and restart but nothing there either. Any help is much appreciated

module level gradle file:

apply plugin: 'com.android.application'

android {

    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.vpaliy.loginconcept"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        jackOptions {
            enabled true
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}


dependencies {
    compile 'com.jakewharton:butterknife:8.5.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
    compile 'com.andkulikov:transitionseverywhere:1.7.4'
    compile 'com.android.support:design:25.3.1'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.github.Q42:AndroidScrollingImageView:1.2'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
}

project level gradle file:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
      google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
like image 876
Siddhivinayak Avatar asked Apr 20 '18 12:04

Siddhivinayak


1 Answers

Moving forward, Java 8 language features will be natively supported by the Android build system.

Well I found that I was committing a silly mistake of not removing the below code

jackOptions {
    enabled true
}

from the flip-concept's build.gradle file as well due to which I wasn't able to build and run the project. After removing it I'm able to run the project

like image 74
Siddhivinayak Avatar answered Nov 05 '22 06:11

Siddhivinayak