Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/179.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
错误:任务“:app:javaPreCompileDebug”的执行失败_Java_Android_Lombok - Fatal编程技术网

错误:任务“:app:javaPreCompileDebug”的执行失败

错误:任务“:app:javaPreCompileDebug”的执行失败,java,android,lombok,Java,Android,Lombok,我在生成代码时遇到此错误: android { compileSdkVersion 27 defaultConfig { applicationId "downloader.video.full.videodownloader" minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.1" useLibrary 'org.apache.http.legacy' testInstrumentation

我在生成代码时遇到此错误:

android 
{

compileSdkVersion 27
defaultConfig 

{

applicationId "downloader.video.full.videodownloader"

minSdkVersion 15

targetSdkVersion 27

versionCode 1

versionName "1.1"

useLibrary 'org.apache.http.legacy'

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes 

{


release 

{

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-
rules.pro'

}

}

}

dependencies 

{

implementation fileTree(include: ['*.jar'], dir: 'libs')


implementation 'com.android.support:appcompat-v7:27.1.1'

implementation 'com.android.support.constraint:constraint-layout:1.1.2'

testImplementation 'junit:junit:4.12'

androidTestImplementation 'com.android.support.test:runner:1.0.2'

androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.2'

implementation 'com.io.tools.android.ramiloif.folderchooser:folderchooser-
dialog:1.0.6'

implementation 'com.google.android.gms:play-services-plus:10.0.1'

implementation 'com.google.android.gms:play-services-ads:10.0.1'

implementation 'com.android.support:design:27.1.1'

implementation files('libs/json-20140107.jar')

implementation 'com.squareup.okio:okio:1.14.1'

implementation 'com.squareup.picasso:picasso:2.71828'

compile 'com.google.android.gms:play-services-analytics:10.0.1'

} 
这是我的项目gradle

Error:Execution failed for task ':app:javaPreCompileDebug'.
> Annotation processors must be explicitly declared now.  The following dependencies on the compile classpath are found to contain annotation processor.  Please add them to the annotationProcessor configuration.
    - lombok-1.16.14.jar (org.projectlombok:lombok:1.16.14)
  Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.  Note that this option is deprecated and will be removed in the future.
  See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.

只需在模块中添加以下行:app gradle文件

It tells you what to do...

> Annotation processors must be explicitly declared now.  The following dependencies on the compile classpath are found to contain annotation processor.  

> Please add them to the annotationProcessor configuration.  
      - lombok-1.16.14.jar (org.projectlombok:lombok:1.16.14)

Like so

    dependencies {

        // Other dependencies
        compileOnly "org.projectlombok:lombok:1.18.4"
        annotationProcessor 'org.projectlombok:lombok:1.18.4'
    }

[See Lombok documentation](https://projectlombok.org/setup/android)

Also, I suggest you delete `libs/json-20140107.jar` and replace it with 

    compile 'org.json:json:20140107'

Although, Android already has a JSON parser, so not clear why you need this at all

欢迎来到stackoverflow!最好保持问题尽可能简洁易读,因此花时间正确缩进源代码以正确显示。此外,你可能想将你为解决问题所做的尝试发布到,这有助于读者直接进入你的问题。你希望其他人花时间解决你的问题。因此,请您花5分钟时间准备好格式良好的输入。预览窗口和所有关于如何设置输入格式的解释都是有原因的。。。
It tells you what to do...

> Annotation processors must be explicitly declared now.  The following dependencies on the compile classpath are found to contain annotation processor.  

> Please add them to the annotationProcessor configuration.  
      - lombok-1.16.14.jar (org.projectlombok:lombok:1.16.14)

Like so

    dependencies {

        // Other dependencies
        compileOnly "org.projectlombok:lombok:1.18.4"
        annotationProcessor 'org.projectlombok:lombok:1.18.4'
    }

[See Lombok documentation](https://projectlombok.org/setup/android)

Also, I suggest you delete `libs/json-20140107.jar` and replace it with 

    compile 'org.json:json:20140107'

Although, Android already has a JSON parser, so not clear why you need this at all
dependencies {
    compileOnly "org.projectlombok:lombok:1.18.4"
    annotationProcessor 'org.projectlombok:lombok:1.18.4'
 }