I have copied and compiled the source code for speech api last month on this location https://github.com/GoogleCloudPlatform/android-docs-samples/tree/master/speech/Speech and works. Now, when I revisited it, I'm having a Configuration with name 'debugAndroidTestCompile' not found. error.
What is causing this? If you ask me how did I know it is the one, I did the process of elimination. I removed one by one on the gradle file and sync. When I removed apply plugin: 'com.google.protobuf' the error disappears.