[Solved] why some imports cannot be resolved?


This is because your compiler is not able to find the necessary packages and or libraries that are needed to resolve these imports. These packages must be included in your class path. For example all of the errors regarding

org.apache.felix.scr.annotations.x

can be resolved after downloading the latest .jar from https://mvnrepository.com/artifact/org.apache.felix/org.apache.felix.scr.annotations/1.11.0

Follow these steps to include jar files in your class path.

  • Drag the required jar file from your download directory to the src
    directory of your project in eclipse
  • Right click on the jar file, Select Build Path and then select Add To Build Path option.
  • A dialogue box will appear asking you to link all files in the jar file, just stick with the defaults and hit OK.
  • You are done now, all your errors regarding imports will be resolved.

2

solved why some imports cannot be resolved?