Table of contents

Android ERROR: Could not find method jackOptions() for arguments

Android May 04, 2020 Viewed 391 Comments 0

Question

In Android Studio 3.5.1, an error occurred during compiling.

ERROR: Could not find method jackOptions() for arguments [build_3s0nycrj8n2ia5mqjtlkgxner$_run_closure2$_closure5$_closure9@4b3ac3dc] on DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=19, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=26, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=210, versionName=v2.1.0_200503_a1bc44a600c, applicationId=com.heytap.push.demo, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={appLabel=com.android.builder.internal.ClassFieldImpl@df725d61}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={versionCommit=a1bc44a600c, versionDate=191120}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig.
Open File

Solution

According to http://tools.android.com/tech-docs/jackandjill. The Jack toolchain is deprecated. Moving forward, Java 8 language features will be natively supported by the Android build system.

Therefore, just comment or delete the following lines in the build.gradle file.

jackOptions {
    enabled true
}
Updated May 04, 2020