Hi,
I am trying to add google cloud translation feature in your speech sample, so modified gradle dependency. But I am getting some errors when building APK . Below are my codes:
...
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/io.netty.versions.properties'
exclude 'META-INF/INDEX.LIST'
....
...
compile('com.google.apis:google-api-services-translate:v2-rev47-1.22.0') {
exclude group: 'com.google.guava'
exclude module: 'jsr305'
}
compile('com.google.cloud:google-cloud-translate:0.8.2-alpha') {
exclude group: 'io.grpc', module: 'grpc-all'
exclude group: 'com.google.protobuf', module: 'protobuf-java'
exclude group: 'com.google.api-client', module: 'google-api-client-appengine'
exclude module: 'jsr305'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
...
...
The errors are:
E:\tempt_test\Speech\app\build\generated\source\proto\devDebug\java\com\google\longrunning\Operation.java:741: Error: The type parameter FloatValue is not within the scope of the type variable MType
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> metadataBuilder_;
E:\tempt_test\Speech\app\build\generated\source\proto\devDebug\java\com\google\longrunning\Operation.java:906: Error: The type parameter Any is not within the scope of the type variable MType
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
...
E:\tempt_test\Speech\app\build\generated\source\proto\devDebug\java\com\google\rpc\Status.java:722: Error: The type parameter Any is not within the scope of the type variable MType
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> detailsBuilder_;
...
BUILD FAILED
There are totally 24 errors like these.
If using "com.google.cloud:google-cloud-translate:0.5.0", it works well! I don't understand......
So how should I write the dependency ?