如何使用Google App Engine的服务生成器创建API目录?

时间:2022-11-15 18:19:28

I've been following the instructions on Google's Doc. -> https://cloud.google.com/appengine/docs/java/endpoints/consume_ios#Java_Compiling_the_client_library_generator_and_generating_your_library

我一直在关注Google的Doc上的说明。 - > https://cloud.google.com/appengine/docs/java/endpoints/consume_ios#Java_Compiling_the_client_library_generator_and_generating_your_library

But I cannot get past step 5 (Compiling the client library generator and generating your library)

但我无法通过第5步(编译客户端库生成器并生成库)

/Users/username/Library/Developer/Xcode/DerivedData/ServiceGenerator-btnyogexyyjtgrgbfjqddcedmkls/Build/Products/Debug/ServiceGenerator \ /Users/username/Documents/discoveryFileName.discovery \ --outputDir /API

However, I get the error - "ERROR: An output directory is required".

但是,我收到错误 - “错误:需要输出目录”。

Any ideas?! I clearly put the output Directory in there. Would this error occur if the discovery file was not in the correct format?

有任何想法吗?!我清楚地把输出目录放在那里。如果发现文件格式不正确,是否会发生此错误?

I've tried many different output directories as well

我也尝试了很多不同的输出目录

Please!!

请!!

1 个解决方案

#1


0  

I see you're using --outputDir /API -- that is, trying to create the directory right under the root directory in your filesystem.

我看到你正在使用--outputDir / API - 也就是说,尝试在文件系统的根目录下创建目录。

The example uses, instead, --outputDir ~/API -- that ~ sign just before the / means it creates the directory inside your home directory (in Unix-like systems).

该示例使用--outputDir~ / API - 在/之前签署〜表示它在您的主目录中创建目录(在类Unix系统中)。

You may miss permissions required to create directories at the top of your filesystem, while you likely have such permissions within your home directory. Therefore, I would recommend doing exactly what the example suggests -- keeping the ~ (tilde) there, rather than removing it.

您可能会错过在文件系统顶部创建目录所需的权限,而您可能在主目录中拥有此类权限。因此,我建议完全按照示例的建议 - 保持〜(代字号),而不是删除它。

#1


0  

I see you're using --outputDir /API -- that is, trying to create the directory right under the root directory in your filesystem.

我看到你正在使用--outputDir / API - 也就是说,尝试在文件系统的根目录下创建目录。

The example uses, instead, --outputDir ~/API -- that ~ sign just before the / means it creates the directory inside your home directory (in Unix-like systems).

该示例使用--outputDir~ / API - 在/之前签署〜表示它在您的主目录中创建目录(在类Unix系统中)。

You may miss permissions required to create directories at the top of your filesystem, while you likely have such permissions within your home directory. Therefore, I would recommend doing exactly what the example suggests -- keeping the ~ (tilde) there, rather than removing it.

您可能会错过在文件系统顶部创建目录所需的权限,而您可能在主目录中拥有此类权限。因此,我建议完全按照示例的建议 - 保持〜(代字号),而不是删除它。