I am trying to generate my first Google Cloud Endpoint and am having trouble generating the client libraries.
我正在尝试生成我的第一个Google Cloud Endpoint,但在生成客户端库时遇到问题。
First I try doing it with the GPE. It generates an endpoints-libs folder in the Eclipse project with a bunch of files. The readme.html says, "The generated service-specific library can be found in the top level directory of the zip file: google-api-services-mayapp-v1-rev20140417180959-1.16.0-rc.jar". There is no such file generated.
首先,我尝试使用GPE。它在Eclipse项目中生成一个带有一堆文件的endpoints-libs文件夹。 readme.html说:“生成的服务专用库可以在zip文件的*目录中找到:google-api-services-mayapp-v1-rev20140417180959-1.16.0-rc.jar”。没有生成此类文件。
Second, I try to generate with the appengine-sdk. It creates myapp-v1-java.zip, which contains the same files and structure that GPE generates, but I don't see any JAR in there that would contain my endpoints.
其次,我尝试用appengine-sdk生成。它创建了myapp-v1-java.zip,它包含与GPE生成的相同的文件和结构,但是我没有看到任何包含我的端点的JAR。
I'm using Eclipse Juno Release 2 and GPE 3.5.1. Just did a Check Updates and I appear to be up to date.
我正在使用Eclipse Juno Release 2和GPE 3.5.1。刚做了检查更新,我似乎是最新的。
NOTE: I am not using Maven and prefer to continue not using it if possible.
注意:我没有使用Maven,如果可能的话,我宁愿继续不使用它。
How does one generate the client libraries?
如何生成客户端库?
1 个解决方案
#1
0
I have found no explanation and assume the problem is that the GPE has been updated and the documentation is old.
我没有找到任何解释,并假设问题是GPE已更新且文档已旧。
What has worked for me is to follow this video which an Android client being build to use an endpoint:
对我有用的是关注正在构建的Android客户端使用端点的视频:
https://www.youtube.com/watch?v=NU_wNR_UUn4
https://www.youtube.com/watch?v=NU_wNR_UUn4
The video shows that one must build the endpoint client libraries (from GPE). That generates some source files in the endpoints-lib. Those source files are then copied to the client app.
视频显示必须构建端点客户端库(来自GPE)。这会在端点-lib中生成一些源文件。然后将这些源文件复制到客户端应用程序。
In my case I was building a Java client app. I followed the instructions for build and Android client app, which are here:
就我而言,我正在构建一个Java客户端应用程序。我按照构建和Android客户端应用程序的说明进行操作,它们位于:
https://developers.google.com/appengine/docs/java/endpoints/consume_android
https://developers.google.com/appengine/docs/java/endpoints/consume_android
That shows how to call the service from an Android app. Specifically, it shows how to use the source classes that were copied to the client app from the endpoints-lib. I had to make a few small adjustments. In the end it seems to work.
这显示了如何从Android应用程序调用该服务。具体来说,它显示了如何使用从端点-lib复制到客户端应用程序的源类。我不得不做一些小的调整。最终似乎有效。
#1
0
I have found no explanation and assume the problem is that the GPE has been updated and the documentation is old.
我没有找到任何解释,并假设问题是GPE已更新且文档已旧。
What has worked for me is to follow this video which an Android client being build to use an endpoint:
对我有用的是关注正在构建的Android客户端使用端点的视频:
https://www.youtube.com/watch?v=NU_wNR_UUn4
https://www.youtube.com/watch?v=NU_wNR_UUn4
The video shows that one must build the endpoint client libraries (from GPE). That generates some source files in the endpoints-lib. Those source files are then copied to the client app.
视频显示必须构建端点客户端库(来自GPE)。这会在端点-lib中生成一些源文件。然后将这些源文件复制到客户端应用程序。
In my case I was building a Java client app. I followed the instructions for build and Android client app, which are here:
就我而言,我正在构建一个Java客户端应用程序。我按照构建和Android客户端应用程序的说明进行操作,它们位于:
https://developers.google.com/appengine/docs/java/endpoints/consume_android
https://developers.google.com/appengine/docs/java/endpoints/consume_android
That shows how to call the service from an Android app. Specifically, it shows how to use the source classes that were copied to the client app from the endpoints-lib. I had to make a few small adjustments. In the end it seems to work.
这显示了如何从Android应用程序调用该服务。具体来说,它显示了如何使用从端点-lib复制到客户端应用程序的源类。我不得不做一些小的调整。最终似乎有效。