在演示项目中编译 'io.grpc:grpc...' 失败

compile 'io.grpc:grpc...' fail in demo project

我从这里下载了android简单的演示helloworld客户端项目,我没有修改代码:

https://github.com/grpc/grpc-java/tree/master/examples/android/helloworld

构建 gradle 时出现错误:

Error:(58, 13) Failed to resolve: io.grpc:grpc-protobuf-lite:1.8.1-SNAPSHOT
Error:(57, 13) Failed to resolve: io.grpc:grpc-okhttp:1.8.1-SNAPSHOT
Error:(59, 13) Failed to resolve: io.grpc:grpc-stub:1.8.1-SNAPSHOT

Gradle:

https://github.com/grpc/grpc-java/blob/master/examples/android/helloworld/app/build.gradle

我正在按照此处的说明进行操作: https://grpc.io/docs/tutorials/basic/android.html

但我不清楚是否需要执行更多步骤才能使其正常工作。我认为 gradle 当你输入 'compile' 时,库会自动从存储库中下载。

我有一台 windows 机器,但我没有在其中安装任何 grpc 库,我是否需要下载并安装一些东西?

您需要签出特定的发布标签:git checkout v1.8.0

sent out a PR to fix this. The Android quickstart 没有遇到这个问题。