Eclipse: The declared package does not match the expected package

后端 未结 13 591
挽巷
挽巷 2020-12-25 09:03

I have a problem importing an external project. I go File -> Import... -> Existing Projects into Workspace, choose the folder where the project is located and everything is

13条回答
  •  庸人自扰
    2020-12-25 09:52

    1. Right click on the external folder which is having package
    src.prefix1.prefix.packagename1 
    src.prefix1.prefix.packagename2
    
    1. Click Build path --> Remove from build path.

    2. Now go the folder prefix1 in the folder section of your project.

    3. Right click on it --> Build path --> Use as source folder.

    4. Done. The package folder wont show any error now. If it still shows, just restart the project.

提交回复
热议问题