如何处理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 ...
随机推荐
- c++中STL中的next_permutation函数基本用法
对于next_permutation函数是针对于排列组合问题的库函数,它的排序方式是按照字典的方式排列的·: 如以下代码对于next_permutation函数的初步解释: #include<c ...
- redis初识及基本操作
一.redis介绍: 1.Redis是什么: REmote DIctionary Server(远程字典服务器) 是完全开源免费的,用C语言编写的,遵守BSD协议,是一个高性能的(Key-Value) ...
- TreeMap读源码总结
红黑树: 定义 A red–black tree is a kind of self-balancing binary search tree in computer science. Each no ...
- ubuntu常用系统命令
安装升级 查看软件xxx安装内容 dpkg -L xxx 查找软件库中的软件 apt-cache search 正则表达式 或 aptitude search 软件包 显示系统安装包的统计信息 apt ...
- Hive 报错信息及解决方法
return code 2 为SQL报错. return code 1 一般为权限问题. 具体要看源码.
- spring boot http2
项目已启动的情况下,启动单元测试报端口has binded 可以使用server.port=-1 禁用端口绑定来启动单元测试 https://docs.spring.io/spring-boot/do ...
- JavaWeb xss攻击
出处: http://www.cnblogs.com/TankXiao/archive/2012/03/21/2337194.html XSS 全称(Cross Site Scripting) 跨站脚 ...
- linux下pid命令
ps aux | grep tomcat| awk '{if(NR==1)print $2}' Linux:批量修改分隔符(awk.BEGIN.FS.OFS.print.tr命令) 批量修改文件的分 ...
- input校验不能以0开头的数字
不以零开头 <input type="text" class="form-control" onkeyup="value=value.rep ...
- RTT之内核服务函数
一 延时函数: rt_thread_delay(t) //调用时进入系统调度. rt_kprintf()函数在kservice.c中实现,如果不使用设备驱动,则由自定义函数void rt_hw_con ...