【发布时间】:2023-04-06 02:01:01
【问题描述】:
我正在学习创建 google-app-engine 以及从我的 app-engine 应用程序生成 Endpoint 客户端库(适用于 Android)。 到目前为止,我做了以下事情
第 1 步:创建端点 API:完成
我已按照此处给出的说明(使用 Maven)并成功部署了 app-engine 应用程序
https://developers.google.com/appengine/docs/java/endpoints/getstarted/backend/
第 2 步:生成客户端库(适用于 Android):此处出现错误
我已按照此处的说明进行操作 https://developers.google.com/appengine/docs/java/endpoints/gen_clients
我从我的应用引擎应用程序的根目录中给出了以下命令
endpoints.sh get-client-lib 问候
但出现以下错误
Dec 16, 2013 5:47:43 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
SEVERE: Received exception processing ./war/WEB-INF/appengine-web.xml
com.google.apphosting.utils.config.AppEngineConfigException: Could not locate /Users/raj/Documents/workspace-maven/helloendpoints/./war/WEB-INF/appengine-web.xml
下面是我的问题,
-
这个命令执行对了吗?
endpoints.sh get-client-lib 问候
在 google 的文档中;第二个论点是 指定为 'get-client-lib' 我给出了相同的名称,而 执行命令;是这样吗?
-
正如您在错误中看到的那样;它描述了;文件 - helloendpoints/./war/WEB-INF/appengine-web.xml 无法定位。 该文件确实在我的应用程序中可用,但位于 不同的目录(确实在 3 个位置);我应该在这里做什么?
- ./src/main/webapp/WEB-INF/appengine-web.xml
- ./target/generated-sources/appengine-endpoints/WEB-INF/appengine-web.xml
- ./target/helloendpoints-1.0-SNAPSHOT/WEB-INF/appengine-web.xml
- ./src/main/webapp/WEB-INF/appengine-web.xml
-
文档建议我编辑“web.xml”文件。但是文件是 在 3 个位置可用,但不确定我必须编辑哪一个(我 已在第三个位置编辑了文件)
- ./src/main/webapp/WEB-INF/web.xml
- ./target/generated-sources/appengine-endpoints/WEB-INF/web.xml
- ./target/helloendpoints-1.0-SNAPSHOT/WEB-INF/web.xml
- ./src/main/webapp/WEB-INF/web.xml
我发现这个问题很难解决;因为除了 Google 官方文档之外,网络上没有其他可用的文档(或)示例。
如果有人可以帮助我解决这个问题,我们将不胜感激。谢谢。
【问题讨论】: