Java: Log Cannot Be Resolved

How to resolve lombok error log cannot be resolved?

In order to solve this problem I had to use STS4 and the same indtallation
for eclpise is work for STS.
lombok is added to the about screen, all good now.

java: lombok: @Slf4j: log cannot be resolved

I could resolve this following the instruction here: https://projectlombok.org/setup/gradle

Error : Log cannot be resolved to a type

solved it: While importing the war eclipse created another projects with the names of jar which are present in lib folder. Some of those project were showing red marks that is there was some problem with them. I deleted all those project and rerun the project. Now it said that it can't find the following exception class: net.sf.jasperreports.engine.JRException I downloaded the jasper reports jar again and put it in the lib folder and voila!! the project is up. Thanks guys for helping me specially Neeraj.

Building with Lombok's @Slf4j and Eclipse: Cannot find symbol log

You also have to install Lombok into Eclipse.

See also this answer on how to do that or check if Lombok is installed correctly.

Full Disclosure: I am one of the Project Lombok developers.

Android Log cannot resolve

Use a static initializer:

static 
{
Log.v("Scan Class", "Excecuted");
}

This will print when your class is loaded. Classes within your app will generally be loaded as Android starts your application.



Related Topics



Leave a reply



Submit