All Questions
Tagged with protobuf-java android
32 questions
0
votes
1
answer
38
views
How to migrate to Gradle kts prototbuf configuration in my Android application build file
I am migrating to Gradle kts in my current Andriod application.
The protobuf configuration is proving to be very challenging
the original verson for gradle is as follows:-
// Versions
def ...
0
votes
1
answer
66
views
Skip Proto file Binding classes generation if already present in AAR file or any other source
I have one AAR file added inside the libs directory in Android Studio project. I have added a proto compiler configurations inside the build.gradle file. I am trying to add a proto file inside the app ...
0
votes
0
answers
365
views
Android proto import files
I am making a Flutter android application which uses photo files. First I had all definitions based in one .proto file. But now I had to split the definitions onto multiple files.
With one file my ...
4
votes
1
answer
485
views
Does Protobuf JavaLite support google.protobuf.Struct / google.protobuf.Value?
Here is the proto message that we trying to send.
message Cta {
string title = 1;
string pid = 2;
google.protobuf.Struct params = 3;
}
Does protobuf-lite library which is recommended for ...
0
votes
3
answers
1k
views
How can I solve "Type com.google.protobuf.Any$1 is defined multiple times" problem on Android Studio
I am upgrading my Android app to support API 33.
For that, I also upgraded protobuf & grpc libraries.
Everything is upgraded and the app works if I build & run it directly from Android Studio ...
11
votes
2
answers
5k
views
Issue on R8 minify
I installed the new version of Android Studio and did update of my project (without changing dependencies) and i had this issue:
Missing class com.google.protobuf....
2
votes
0
answers
421
views
how to integrate sentencepiece, protobuf into existing android project correctly
I am trying to integrate pytorch model to process language. This is why I need the sentencepiece to tokenize the sentence chunks. But I am unable to do that correctly.
I did not find any robust ...
1
vote
6
answers
850
views
Caused by: org.gradle.api.GradleException: Cannot find a version of 'com.google.protobuf:protobuf-javalite' that satisfies the version constraints:
I am facing an error while building an android app with react-native, If anyone has an idea then help me out.
Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':...
0
votes
1
answer
167
views
In gRPC, why does the parameter type of my generated newStub method requires com.google.protobuf.RpcChannel rather than ManagerChannel?
I'm trying to use gRPC in my android project.
I have generated my java class by protoc compiling.
However, I notice that the generated method newStub requires com.google.protobuf.RpcChannel rather ...
1
vote
0
answers
692
views
How do I generate protobuf java files resolved for the correct package name?
I am using the protobuf gradle plugin (https://github.com/google/protobuf-gradle-plugin) to generate .java files from protbufs made by a different team at my company.
My setup looks like so
protobuf {
...
7
votes
0
answers
2k
views
Datastore · Chaining serializers / Default values
The core problem is that I want to set default values for child messages. Since proto3 doesn't allow the setting of default values in the proto file.
Example Protobuf
message Person {
int32 age = 1;
...
4
votes
1
answer
933
views
How do I pass option to JavaPluginExtension using Kotlin DSL
I'm having issue converting these gradle groovy code to kotlin dsl.
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.8.0'
}
generateProtoTasks {
all().each { task ->
...
1
vote
1
answer
830
views
Conflict between Firebase in app messaging ( implementation 'com.google.firebase:firebase-inappmessaging-display:19.1.5') and gRPC in Android
I was going to implement Firebase in-app messaging functionality in my Android application that uses gRPC server. However when I put a dependency for Firebase in-app messaging (implementation 'com....
1
vote
1
answer
5k
views
Android Could not find method protobuf() for arguments
I am adding plugin & dependency for protobuf but getting this error on gradle sync.
Note: Protobuf classpath is added in project level build.gradle file
Could not find method protobuf() for ...
5
votes
1
answer
2k
views
Internal error in Cloud Firestore (22.1.0) when running instrumentation test
I get an internal error message from Cloud Firestore. When I run this test, the App is getting a list of items from Firebase. This takes a while. In the meantime, the test stops.
Every library is ...
3
votes
0
answers
2k
views
Once I added firebase dependency and got duplicated protobuf classes error
Everything is working fine once I added the below dependencies in the Gradle getting the below error
dependency :
implementation 'com.google.firebase:firebase-perf:19.1.0'
Error:
Duplicate class com....
5
votes
1
answer
2k
views
Protobuf "Unresolved reference" with generated classes in Android Studio using Kotlin
it's my first time diving in with protobuf and jetpack's DataStore but I've encountered an issue which is quite confusing.
I've created my .proto file in src/main/java/proto, it's really simple:
...
0
votes
0
answers
95
views
How i can use Protobuffer using a tcp connection?
I want so send protobuffer to a server which do something with the protobuffer, im developing on android studio.
private OutputStream toServer ;
public void serialize(byte[]message) throws ...
0
votes
1
answer
1k
views
Generating java class from proto-buf (not using protobuf-lite)
I had success generating protobuf code to java using java-lite, problem is that I need plain 'java'
Project level:
// Top-level build file where you can add configuration options common to all sub-...
2
votes
0
answers
2k
views
Getting the error google/protobuf/descriptor.proto: File not found. on moving to protobuf javalite from protobuf java
Below is what code I have added in my gradle file to solve duplicate GeneratedMessageLite class issue in protobuf upon which I am getting the error:
Cause: protoc: stdout: . stderr: google/protobuf/...
0
votes
1
answer
1k
views
android protobuf javalite and R8
my release build failed on the task :minifyReleaseWithR8
> Task :app:minifyReleaseWithR8 FAILED
AGPBI: {"kind":"error","text":"Type com.google.protobuf....
8
votes
1
answer
1k
views
Resolve Firebase InApp Messasing and Dialogflow dependencies
I have a project where I am using both FirebaseInAppMessaging and Dialogflow but I am having a hard time resolving the dependencies. After adding both FirebaseInAppMessaging and Dialogflow, I get the ...
2
votes
2
answers
3k
views
Execution failed for task ':app:mergeExtDexXXXDebug'
I am using
Android Studio 3.5, gradle-5.4.1-all.zip,
com.android.tools.build:gradle:3.5.0,
org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
I got error when i rebuild project:
What went wrong:
...
4
votes
2
answers
6k
views
gRPC client: error in compiled file (io.grpc.protobuf does not exist)
I made a simple protobuf+gRPC server/client example with Python, and wanted now to complete it with an Android Java client. However, I struggled through the documentation and got it mostly working (....
1
vote
1
answer
822
views
Google Cloud Speech to Text Error: java.lang.NoSuchMethodError: No virtual method build()Lcom/google/protobuf/GeneratedMessageLite;
I'm using Google Cloud Speech to text. For some reason, It works only the first time. After that, this error keeps appearing. I'm stuck.
java.lang.NoSuchMethodError: No virtual method
build()...
0
votes
0
answers
90
views
Android GRPC Protobuf not building/linking correctly
I am using protobufs in gradle java in my project but am having an issue parsing the proto below
https://github.com/lightningnetwork/lnd/blob/master/lnrpc/rpc.proto
It seems to not build correctly ...
3
votes
1
answer
2k
views
Android Gradle Protobufs: How to compile the full protobuf and not the "lite" version?
Every example I can find of configuring build.gradle to compile protobufs uses the "lite" version and looks something like this:
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:...
0
votes
1
answer
579
views
com.android.tools.r8.errors.CompilationError: Program type already present: com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream
I am getting
"Program type already present:
com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream"
runtime error.I have tried using multidix and also referred more links
but ...
1
vote
1
answer
911
views
Release build fails
I'm trying to build a signed version (release version) and i got the following error
Duplicate zip entry [com/google/protobuf/d$1.class == com/google/protobuf/Any$1.class]
I tried to clean,...
0
votes
1
answer
1k
views
Method Marshaller errors in protoc generated Grpc Services on Android
I have a server running the grpc endpoints which I'd like to connect to using an android client. I am trying to generate the required ..Grpc.java so that I could use the .newStub() methods for ...
2
votes
1
answer
1k
views
Updating Google Cloud Speech API protobuf gradle to 0.8.5 duplicate libraries
After updating to protobuf gradle to 0.8.5 of this project
https://github.com/GoogleCloudPlatform/android-docs-samples/tree/master/speech/Speech, I received this error message:
Program type already ...