Google Cloud Speech API protobuf导致找不到"debugAndroidTestCompile"

pad*_*nau 3 android google-speech-api

我上个月在这个位置复制并编译了语音api的源代码https://github.com/GoogleCloudPlatform/android-docs-samples/tree/master/speech/Speech 并且正常工作.现在,当我重新访问它时,我找不到名为'debugAndroidTestCompile'配置.错误.

是什么造成的?如果你问我怎么知道它是那个,我做了消除的过程.我在gradle文件上逐个删除并同步.当我删除了应用插件:'com.google.protobuf'时,错误消失了.

小智 13

在build.gradle中将protobuf版本更新为0.8.5

buildscript {
  repositories {
    mavenCentral()
  }
  dependencies {
    classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.8'
  }
}
Run Code Online (Sandbox Code Playgroud)