在我的 Eclipse 项目 (GWT) 中,我试图导入下面的模块,以添加一些 Blobstore 代码。
import com.google.appengine.api.files.FileService;
import com.google.appengine.api.files.FileServiceFactory;
[ERROR] Line 3: The import com.google.appengine.api.files cannot be resolved
[ERROR] Line 4: The import com.google.appengine.api.files cannot be resolved
最佳答案
您不能从 GWT 客户端引用非客户端代码。请记住,您的 GWT 客户端代码将被编译为 Javascript,因此无法编译出对实际 Java 的任何引用。
确保对 blobstore api 的任何引用都是在服务器代码中完成的,而不是在客户端代码中完成的。在必须可编译为 javascript 的代码中,永远不需要这些导入。
https://stackoverflow.com/questions/8115415/
相关文章:
android - Android : How to tell where an error is
apache-flex - 将 Flex 从 3.2 升级到 4.5 - 错误和警告
compiler-errors - 用于MPLAB的示例USB项目上的编译错误
visual-studio-code - 如何更改 VS Code 设置以使用 JetBrains
gwt - Maven GWT插件 “failed with status 1”错误
compilation - 在 CentOS 6.0 上编译单声道时 undefined refer