android - 生成云端点 : MyApp is not configured as a web application

标签 android eclipse google-app-engine

我正在尝试创建一个新的 Google App Engine 应用程序。

在一个全新的 Android 项目中,我添加了一个 App Engine 项目,一切看起来都很好。现在,当尝试通过 Google> Generate Cloud Endpoint 为类生成端点时,出现了一些意外异常

以下是一些异常(exception)情况。

java.lang.IllegalArgumentException: Project MyApp is not a web-app project

org.eclipse.core.runtime.CoreException: MyApp is not configured as a web application

这似乎没有意义,它是一个 Android 应用程序,但我可能弄错了它应该如何运行。

如何使用 Eclipse 解决这些错误

最佳答案

我认为其他人肯定会犯与我相同的愚蠢错误,所以我会回答我自己的问题而不是删除我的耻辱,以防它可以帮助其他人。

基本上这个错误消息发生在关注 https://developers.google.com/eclipse/docs/endpoints-addentities 时并且您在错误的项目中生成了端点类。

当您创建一个由 Google App Engine 驱动的 Android 应用程序时,您将至少有两个项目:MyAppMyApp-AppEngine。您需要将您的实体类放入 MyApp-AppEngine 项目而不是您的 MyApp 项目。

如果您将您的类放在 MyApp 中并以这种方式生成端点类,您最终会混淆 Java/Eclipse/您自己/等等。然后它会给您错误

java.lang.IllegalArgumentException: Project MyApp is not a web-app project

org.eclipse.core.runtime.CoreException: MyApp is not configured as a web application

关于android - 生成云端点 : MyApp is not configured as a web application,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16727349/

相关文章:

eclipse - 在 Eclipse 中运行 Map Reduce 程序

自定义安装处理程序的 Eclipse p2 替代方案

python - 为什么 Python 在非迭代类型的操作中会给我一个 "TypeError: argument of type ' UserAgent' is not iterable"?

python - Flask 在 Google App 引擎上的端口 5000 上运行

android - onResume() 后无法关闭 AlertDialog

android - 根据按下的 AlertDialog 按钮做出决定

java - Android PopupWindow showAtLocation() vs showAsDropDown() - 第一个对我有用,第二个不是

java - 从服务中检索位置

Java + Eclipse : Synchronize stdout and stderr

java - Google App Engine 不显示 .png 文件