Error in ./gradlew: Symbol not found

In a project with lombok. It works on the command line when run with intellij idea

./gradlew bootRun

Then

error:Can't find symbol

When you are told

buildscript {
    ext {
        springBootVersion = '2.0.1.RELEASE'
    }
    repositories {
        mavenCentral()
        maven { url "https://plugins.gradle.org/m2/" } //add to
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath "net.ltgt.gradle:gradle-apt-plugin:0.15" //add to
    }
}
...
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'idea'
apply plugin: 'net.ltgt.apt' //add to

dependencies {
    compile('org.springframework.boot:spring-boot-starter')
...
    compileOnly('org.projectlombok:lombok:1.16.20')
    apt "org.projectlombok:lombok:1.16.20" //add to
}

compileJava.dependsOn(processResources)

task wrapper(type: Wrapper) {
    gradleVersion = '4.7'
}

Add the above additions.

I couldn't use the # plugins syntax. I gave up quickly

Recommended Posts

Error in ./gradlew: Symbol not found
Symbol not found error when new class in another Java file
Add if not in Set, error message if
ffi Library not loaded: fix error in /opt/brew/opt/libffi/lib/libffi.6.dylib
Remedy for command not found in rails s
Correspondence when Ruby version does not switch in rbenv
Error in ./gradlew: Symbol not found
Error: Main class not found or could not be loaded
Error handling in Graphql-ruby
[Error] The app is not displayed in the production environment
Rails 6 startup error "Webpacker configuration file not found" Solution
Customize the display when an error such as 404 Not Found occurs in Spring Boot
ERROR! MySQL server PID file could not be found!
What to do when Method not found in f: ajax
Error in production environment (The asset "~" is not present in the asset pipeline.)
When [command not found: composer] is displayed when [composer install] is displayed in Laravel
If the submodule assets are not found in the Play Framework
The timedatectl set-timezone Asia/Tokyo command causes the error zsh: command not found: timedatectl.
"tx" is not bound error
rails error Library not loaded
ActiveRecord :: NotNullViolation in Devise error
Error in rails db: migrate
HttpServletRequest class file not found
npm error in docker tutorial
Error in Spring database connection
How to deal with 405 Method Not Allowed error in Tomcat + JSP
The repository ... is not signed error in docker build apt-get update
ERROR: In file ./.env: environment variable name'THOR_SILENCE_DEPRECATION' may not contain whitespace.