【问题标题】:Google Assistant API generating .proto file missing importGoogle Assistant API 生成 .proto 文件缺少导入
【发布时间】:2017-11-04 01:18:32
【问题描述】:

我收到了错误

google/api/http.proto: File not found
google/protobuf/descriptor.proto: File not found

尝试为 Embedded_assistant.proto 生成 .java 文件时。我正在为 Android 使用Protobuf Plugin for Gradle

descriptor.proto 文件在哪里可以找到,因为我在 Google API github 页面上的任何地方都找不到它。

【问题讨论】:

    标签: android grpc google-assistant-sdk


    【解决方案1】:

    Android 缺少的 descriptor.proto 是 protobuf issue 1889。解决方法是在完整的 protobuf 库上添加 protobuf 依赖项:

    dependencies {
      protobuf 'com.google.protobuf:protobuf-java:3.4.0'
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-04-10
      • 2021-04-17
      • 2020-01-03
      • 1970-01-01
      • 1970-01-01
      • 2017-09-04
      • 1970-01-01
      相关资源
      最近更新 更多