【问题标题】:Google Cloud Speech API protobuf is causing 'debugAndroidTestCompile' not foundGoogle Cloud Speech API protobuf 导致找不到“debugAndroidTestCompile”
【发布时间】:2018-04-11 10:40:30
【问题描述】:

我上个月在这个位置https://github.com/GoogleCloudPlatform/android-docs-samples/tree/master/speech/Speech复制并编译了speech api的源代码 和作品。现在,当我重新访问它时,我发现 找不到名称为“debugAndroidTestCompile”的配置。 错误。

这是什么原因造成的?如果你问我怎么知道是那个,我做了排除的过程。我在gradle文件上一一删除并同步。当我删除 apply plugin: 'com.google.protobuf' 时,错误消失了。

【问题讨论】:

    标签: android google-speech-api


    【解决方案1】:

    protobuf 版本更新到build.gradle 中的最新版本。目前是0.8.8,请查看GitHub存储库Protobuf Plugin for Gradle的最新版本。

    buildscript {
      repositories {
        mavenCentral()
      }
      dependencies {
        classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
      }
    }
    

    【讨论】:

    • 请注意,您会在项目级别的 build.gradle 文件中找到它。
    猜你喜欢
    • 2017-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-12
    相关资源
    最近更新 更多