Error: Configuration cannot be run until project has been synced

Error: Configuration cannot be run until project has been synced

我正在使用 PyCharm 和 Bazel 插件。当尝试设置命令 运行 我的程序时,有一条消息说

Error: Configuration cannot be run until project has been synced.

忽略该消息并尝试 运行 当然会导致崩溃。我试过 运行ning file>>synchronize 但这似乎没有效果。如何同步我的项目?

您必须 "File > Import Bazel Project..." 才能在 PyCharm、Goland 等内部的 Bazel 环境中运行。您不能只创建 Run/Debug Bazel 配置。