Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kotlin/JVM上的Grpc_Kotlin_Intellij Idea_Jvm_Grpc - Fatal编程技术网

Kotlin/JVM上的Grpc

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

我一直在寻找一个博客,解释如何将grpc添加到我的项目中。我发现最好的是:

不幸的是,这里的步骤没有明确解释。proto文件应该放在哪里,Protobuf编译器应该准确地导入到哪里(我真正需要它做什么?)。 错误: 任务“:存根:extractIncludeProto”的执行失败

> 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上。

您的错误是什么?如果将其添加到我的问题中,我真的不明白为什么这样做不起作用,我已经尝试过,也没有解决我的问题