1

PDFbox jar is added in intellij(Setting> Project Structure> Modules> Dependencies) and Have added the gradle dependency as testCompile 'org.apache.pdfbox:pdfbox:2.0.1' in gradle build and the build is successful.Even after this importing 'import org.pdfbox...' in java file shows error as cannot resolve symbol pdfbox.

Also tried File->Invalidate Caches\Restart.

Sera
  • 21
  • 1
  • 6

1 Answers1

1

Sometimes, you don't need to open the Project Structure dialog to create a library and add it to dependencies of a module. This is the case when there are .jar files within your project content roots.

You can select such .jar files in the Project tool window and use these files to create a library. When doing so, you will be able to select the library level and the module to whose dependencies the new library should be added.

In a similar way, you can use a directory containing .jar files to create a library.

Open the Project tool window (e.g. View | Tool Windows | Project).
Select the .jar file or files to be included in the library, or a directory that contains the .jar files of interest.
Select Add as Library from the context menu.
In the Create Library dialog, specify the library name, level and the module in which this library will be used.

This solved the issue.

Sera
  • 21
  • 1
  • 6