This is my build.gradle.
apply plugin: 'java'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'io.grpc:grpc-okhttp:1.4.0'
compile 'io.grpc:grpc-protobuf-lite:1.4.0'
compile 'io.grpc:grpc-stub:1.4.0'
compile 'javax.annotation:javax.annotation-api:1.2'
}
sourceCompatibility = "1.7"
targetCompatibility = "1.7"
apply plugin: 'com.google.protobuf'
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.0.0'
}
plugins {
javalite {
artifact = "com.google.protobuf:protoc-gen-javalite:3.0.0"
}
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.0.0' //
CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
all().each { task ->
task.plugins {
javalite {}
grpc {
// Options added to --grpc_out
option 'lite'
}
}
}
}
}
I copied hellowworld.proto to my module. Once I make the module, Android Studio
gives error Duplicated class io.grpc.examples.helloworld.HelloReply. I searched
the file explorer, the same class exists in
build\generated\source\proto\main\java\io\grpc\examples\helloworld\HelloReply.java
and
D:\SimpleChat\protocol\build\generated\source\proto\main\javalite\io\grpc\examples\helloworld\HelloReply.java.
<https://lh3.googleusercontent.com/-uSl8ji65z40/WWsF86qV1fI/AAAAAAAAIMc/3jlf8CfyW-EOze4XmNUZhH1lZAPR8JfRgCLcBGAs/s1600/%25E6%258D%2595%25E8%258E%25B7.JPG>
I checked the sample repository in https://github.com/grpc/grpc-java, it only
has the java one.
How do I resolve this?
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/2071b2d9-9168-4b20-83ec-769215328a83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.