找不到参数的方法 jackOptions() [英] Could not find method jackOptions() for arguments

查看:26
本文介绍了找不到参数的方法 jackOptions()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正面临着

无法在 DefaultConfig_Decorated{name=main, dimension=Version, minSdkVersion=DefaultApiVersion{mAcodename targetSull},{mCodename=137} 上找不到参数的方法 jackOptions() [build_ccqj3loj50621uihss8xz3wml$_run_closure1$_closure3$_closure6@24055137]=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} 类型为 com.android.build.gradle.internal.dsl.DefaultConfig.

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.

当我尝试从 Github 克隆 this 存储库时出现的问题.我已经尝试了官方文档 disable jack 并检查了 SO link1link2 但他们没有多大帮助,因为我试图删除

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
}

根据官方文档从 gradle 开始,但错误仍然存​​在,并且还尝试使缓存无效并重新启动,但也没有.非常感谢任何帮助

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

模块级gradle文件:

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'
}

项目级gradle文件:

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
}

推荐答案

展望未来,Android 构建系统将原生支持 Java 8 语言功能.

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
}

来自 flip-concept's build.gradle 文件也是如此,因此我无法构建和运行该项目.删除它后,我可以运行该项目

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

这篇关于找不到参数的方法 jackOptions()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆