在intelliJ中包不存在错误 [英] Package doesn't exist error in intelliJ
问题描述
我正在尝试使用烧烤条码打印库。我已经通过项目结构添加库成功地将库添加到IntelliJ。然后我导入了包并编写了方法,这没有给我任何错误。这些包在课堂上可用。
I'm trying to use the barbecue barcode printing library. I have successfully added the library to IntelliJ through project structure add library. Then I imported the packages and wrote the methods, which gave me no error. The packages were available in the class.
但是当我编译它时会给我错误:
But when I compile it gives me the error:
error: package net.sourceforge.barbecue does not exist
这怎么可能是吗?
我在ubuntu编码,还有其他地方需要添加库吗?
I'm coding in ubuntu, is there any other place to which I have to add the library?
感谢。
Tika
Thanks. Tika
推荐答案
我试图Maven> Reimport但实际修复它的唯一办法是关闭项目,删除.idea目录,然后重新打开项目。
I tried to "Maven > Reimport" but the only thing that actually fixed it was to close the project, delete the .idea directory, and reopen the project.
这篇关于在intelliJ中包不存在错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!