google-api-services-translate 和 google-cloud-translate 做同样的事情吗?

Does google-api-services-translate and google-cloud-translate do the same thing?

Android 开发 cloud translate

我看都是译者的库。云视觉也有两个库,但在 Android Sample we use the cloud-vision of google-api-services different from cloud-service 中。 translator-API是不是和vision-api做的一样?

最新版本的库:

google-api-服务翻译:https://mvnrepository.com/artifact/com.google.apis/google-api-services-translate/v2-rev49-1.22.0

google-云翻译:https://mvnrepository.com/artifact/com.google.cloud/google-cloud-translate/0.18.0-beta

我会尝试解释你的问题,但你问的不是很清楚,

previous/old 库是自动生成的。其中一些使用起来不是很直观,难以测试,并且需要您编写大量样板代码。

因此,Google 开始推出更新的库以改善体验。有些现在是手写的,更加地道,有些受益于 gRPC。事实上,您实际上会发现新库只是位于旧库之上。例如,这里是 BigQuery client library:

的依赖树片段
+--- com.google.cloud:google-cloud-bigquery:0.8.1-beta
|    +--- com.google.cloud:google-cloud-core:0.8.1-alpha
|    |    +--- com.google.auth:google-auth-library-credentials:0.6.0
|    |    +--- com.google.auth:google-auth-library-oauth2-http:0.6.0
|    |    |    +--- com.google.auth:google-auth-library-credentials:0.6.0
|    |    |    +--- com.google.http-client:google-http-client:1.19.0 -> 1.22.0
[..]
|    \--- com.google.apis:google-api-services-bigquery:v2-rev330-1.22.0
|         \--- com.google.api-client:google-api-client:1.22.0 (*)
[..]

总之,你应该使用较新的"Google Cloud Client Libraries"。例如这些 Cloud Vision and Cloud Translate 个。

Here 是包含更多详细信息的页面。