gpt4 book ai didi

android - 找不到参数的方法 jackOptions()

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:37:44 29 4
gpt4 key购买 nike

大家好,我面对的是

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.

当我试图克隆 this 时出现问题来自 Github 的 repo 。我试过官方文档disable jack并检查了 SO link1 , link2但是当我试图删除

时,它们并没有太大帮助
jackOptions {
enabled true
}

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

模块级gradle文件:

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文件:

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

最佳答案

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

好吧,我发现我犯了一个愚蠢的错误,没有删除下面的代码

jackOptions {
enabled true
}

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

关于android - 找不到参数的方法 jackOptions(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49941319/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com