大家好,我正面对着
无法在DefaultConfig_Decorated {name = main,dimension = null,minSdkVersion = DefaultApiVersion {mApiLevel = 16,mCodename ='null'},targetSdkVersion = DefaultApiVersion {找到参数[build_ccqj3loj50621uihss8xz3wml $ _run_closure1 $ _closure3 $ _closure6 @ 24055137]的方法jackOptions() 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。
当我试图从Github克隆this 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
}
展望未来,Android构建系统将本身支持Java 8语言功能。
好吧,我发现我犯了一个愚蠢的错误,就是不删除下面的代码
jackOptions {
enabled true
}
来自flip-concept's build.gradle
文件,因为我无法构建和运行该项目。删除它后,我就可以运行该项目了