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

问题描述

大家好,我要面对

当我尝试从Github克隆回购时发出

问题.我已经尝试了官方文档禁用千斤顶,并且还检查了SO link1 ,,但是当我尝试删除

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
}

推荐答案

好吧,我发现自己犯了一个愚蠢的错误,就是不删除下面的代码

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

jackOptions {
    enabled true
}

来自翻转概念的 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()作为参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 23:48