Kotlin/JVM上的Grpc
我一直在寻找一个博客,解释如何将grpc添加到我的项目中。我发现最好的是: 不幸的是,这里的步骤没有明确解释。proto文件应该放在哪里,Protobuf编译器应该准确地导入到哪里(我真正需要它做什么?)。 错误: 任务“:存根:extractIncludeProto”的执行失败Kotlin/JVM上的Grpc,kotlin,intellij-idea,jvm,grpc,Kotlin,Intellij Idea,Jvm,Grpc,我一直在寻找一个博客,解释如何将grpc添加到我的项目中。我发现最好的是: 不幸的是,这里的步骤没有明确解释。proto文件应该放在哪里,Protobuf编译器应该准确地导入到哪里(我真正需要它做什么?)。 错误: 任务“:存根:extractIncludeProto”的执行失败 > Could not resolve all files for configuration ':stub:compileProtoPath'. > Could not find io.grpc:g
> Could not resolve all files for configuration ':stub:compileProtoPath'.
> Could not find io.grpc:grpc-kotlin-stub:1.1.0-SNAPSHOT.
Searched in the following locations:
- file:/C:/Users/David/.m2/repository/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/maven-metadata.xml
- file:/C:/Users/David/.m2/repository/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/grpc-kotlin-stub-1.1.0-SNAPSHOT.pom
- https://repo.maven.apache.org/maven2/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/maven-metadata.xml
- https://repo.maven.apache.org/maven2/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/grpc-kotlin-stub-1.1.0-SNAPSHOT.pom
- https://dl.google.com/dl/android/maven2/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/maven-metadata.xml
- https://dl.google.com/dl/android/maven2/io/grpc/grpc-kotlin-stub/1.1.0-SNAPSHOT/grpc-kotlin-stub-1.1.0-SNAPSHOT.pom
Required by:
project :stub
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
基本问题可能是所有这些都基于此,我无法从examples文件夹编译任何项目。问题是gradle无法找到原型项目,即使它在那里(在我看来)
所以我决定问你,是否有人有关于如何使用空的Kotlin/JVM应用程序构建简单的grpc服务器的链接或知识
很抱歉问这个简单的问题,但这真的让我很不安,因为这根本不起作用替换
grpc kotlin存根
版本从1.1.0-SNAPSHOT
到1.1.0
;因为在这些存储库中找不到快照。或者您应该首先使用grpc kotlin stub
项目中的mvn install
将1.1.0-SNAPSHOT
安装到本地maven repo上。您的错误是什么?如果将其添加到我的问题中,我真的不明白为什么这样做不起作用,我已经尝试过,也没有解决我的问题