gpt4 book ai didi

java - 添加 java8 支持时出现 Android Studio 错误

转载 作者:IT王子 更新时间:2023-10-28 23:35:16 26 4
gpt4 key购买 nike

我的 Android Studio 或配置有什么问题?

Error:(22, 0) Could not find method jackOptions() for arguments [build_1b0umrzpkhcolzr325bxbizec$_run_closure1$_closure5@41c39fc1] on project ':app' of type org.gradle.api.Project.

这是我的 build.gradle

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.twtstudio.wepeiyanglite"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
jackOptions {
enabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}


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

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0-beta1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()

}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

我猜我的开发环境中没有启用千斤顶,如何找出错误并修复它?我已经安装了jdk1.8

最佳答案

jackOptions 应该像这样在 defaultConfig{} 中:

defaultConfig {
...

jackOptions {
enabled true
}
}

关于java - 添加 java8 支持时出现 Android Studio 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38944593/

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