I was working on my final year project, an android app which involves both firebase and dialogflow. I have this problem of "class file for com.google.protobuf.MessageOrBuilder not found".
This is my app gradle code:
android{
..
..
configurations.all {
exclude group:'com.google.api.grpc',module:'proto-google-common-protos'
exclude group: 'com.google.protobuf'
//exclude group: 'com.google.guava',module: 'guava-jdk5'
}
packagingOptions {
exclude 'META-INF/INDEX.LIST'
exclude 'META-INF/DEPENDENCIES'
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies{
..
..
//dialogflow
implementation 'com.google.cloud:google-cloud-dialogflow:2.1.0'
implementation 'io.grpc:grpc-okhttp:1.30.0'
}
These are the errors that I faced:
error: cannot access MessageOrBuilder
.setText(TextInput.newBuilder().setText(message).setLanguageCode("en-US")).build();
^
class file for com.google.protobuf.MessageOrBuilder not found
error: cannot access GeneratedMessageV3
QueryInput input = QueryInput.newBuilder()
^
class file for com.google.protobuf.GeneratedMessageV3 not found
error: cannot access Builder
.setText(TextInput.newBuilder().setText(message).setLanguageCode("en-US")).build();
^
class file for com.google.protobuf.GeneratedMessageV3$Builder not found
*Update: The dialogflow dependencies clashes with firebase dependencies, which causes an error for my app to connect to its firebase.
I hope u can help me. Thank you.