如何处理Eclipse错误消息 The declared package does not match the expected package
我从github下载了一个开源项目后,导入到自己Eclipse之后,遇到了这个烦人的错误消息:
The declared package "com.sap.smartService" does not match the expected package "main.java.com.sap.smartService"

这是我的项目文件目录:

解决方案:对项目点击右键,选择Properties->Build Path, 发现src文件夹被设为build path。

首先右键src文件夹,选择Remove from Build Path将其从build path中移除:

然后选择src/main下面的java文件夹,设置成build path,重启Eclipse:

错误即消失:

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

如何处理Eclipse错误消息 The declared package does not match the expected package的更多相关文章
- The declared package does not match the expected package Java
今天使用vscode 编写java代码做测试时候,发现这个问题,大概总结一下. 目录结构 bao -> Point.java test.java package bao; public clas ...
- The declared package does not match the expected package
The declared package does not match the expected package. 1.选中项目右击选择Build Path-->再选择Configure Bui ...
- The declared package "com.dao" does not match the expected package "src.com.dao"
今天把项目代码上传到svn后出现例如以下错误:The declared package "com.dao" does not match the expected package ...
- 如何处理Docker错误消息:please add——insecure-registry
本地安装Kubernetes时,遇到如下的错误消息: pleade add --insecure-registry gcr.io to daemon's arguments 解决方案:点击Docker ...
- 如何处理错误消息Please install the gcc make perl packages
如何处理这行错误消息? Please install the gcc make perl packages from your distribution. 执行命令行:yum install gcc ...
- 如何处理VirtualBox启动错误消息:The vboxdrv kernel module is not loaded
我在启动minikube时,遇到如下错误消息: Starting local Kubernetes v1.10.0 cluster... Starting VM... E1010 03:27:37.9 ...
- 如何处理错误消息Please install the Linux kernel header files
Please install the Linux kernel "header" files matching the current kernel 当我启动minilkube时遇 ...
- 如何处理用代码创建SD Sales order时遇到的错误消息KI 180
错误消息KI 180:You must enter a company code for transaction Create sales document 代码: REPORT zcreate_so ...
- 如何处理SAP云平台错误消息 there is no compute unit quota for subaccount
当我试图部署一个应用到SAP云平台的neo环境时: 指定Compute Unit Size为Lite: 点击Deploy按钮,遇到如下错误消息:there is no compute unit quo ...
随机推荐
- 精简的网站reset和css通用样式库
一.CSS reset body{ line-height:1.4; color:#; font-family:arial; font-size: 12px; } input,textarea,sel ...
- php中静态绑定
自 PHP 5.3.0 起,PHP 增加了一个叫做后期静态绑定的功能,用于在继承范围内引用静态调用的类. 虽然也可以调用非静态方法,但是不会在运行时绑定. static 不再只是简单的静态修饰关键字. ...
- Python模块:operator简单介绍
Python官方文档地址:https://docs.python.org/3.6/library/operator.html?highlight=operator Operator提供的函可用于对象比 ...
- my.宠物升级79级
1.蚌仙子 74级半不到的时候,吃 月华露(500000经验的那种) 吃3个 正好 79级半 我记得 之前 是升满75级 再吃月华露 到79级的时候 经验溢出了.不突破还好,突破的话 宠物就升级了 ...
- Mybatis学习笔记2 - 解析config
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC ...
- js写ajax并解析json
function down(t){ var req = createRequest(); //创建request req.open("GET","selectWord ...
- Mongodb installation & userguide
1.Mongodb Installation in Ubuntu (1) Download from: https://www.mongodb.org/downloads File: mongodb- ...
- windows下自动更改IP的小工具(bat批处理文件)
每次上线,都要先上灰度环境再上到正式环境.在上到灰度环境时,访问灰度环境通过自动获取IP和更改指定dns来实现.具体如何实现,大家可自行百度. 新建一个文本文档,将其后缀改为bat,打开该文件,拷贝一 ...
- pta08-图7 公路村村通 (30分)
08-图7 公路村村通 (30分) 现有村落间道路的统计数据表中,列出了有可能建设成标准公路的若干条道路的成本,求使每个村落都有公路连通所需要的最低成本. 输入格式: 输入数据包括城镇数目正整数N ...
- BNU 27847——Cellphone Typing——————【字典树】
Cellphone Typing Time Limit: 5000ms Memory Limit: 131072KB This problem will be judged on UVA. Origi ...