Android Studio 无法识别在导入的项目库模块中所做的更改

Android Studio not recognising changes made in imported project library module

我已经下载了ZXing核心源文件,并用这些源文件创建了一个新项目。然后我将这个项目作为一个新模块导入到我的主项目中。

这工作正常,所有编译都顺利 运行。

然而,当我尝试更改导入项目中的一些代码时,例如创建一个新方法,IDE 没有检测到任何编译错误,但是当我 运行应用程序,它说不存在这样的方法。

Here is a screenshot of the error I get when I tried adding and calling a method called please() within the imported project

Here is a screenshot of the actual method I added to the imported project

我在我的主应用程序中这样调用它:

Log.i(TAG, "" + Decoder.please());

有什么想法吗?

您是否尝试过清理和重建您的项目?还要关闭 Android 工作室并重新开放?

只是回答,以便 OP 可以选择最佳答案并关闭问题