Hi @DonManfred ,
I have just got some time to try the firestore again.
I tried compiling the following code.
and it gave me this error:
I have included all of the additional jars and patched my SDK to include com.google.protobuf
I have just got some time to try the firestore again.
I tried compiling the following code.
B4X:
Activity.LoadLayout("page")
fs.Initialize("Firestore",True)
Dim driver As CollectionReference = fs.collection("cities","CitiesCollection")
If driver <> Null Then
Log("setting to get all cities")
' driver.whereEqualTo("id","DonManfred").limit(1).fetch("DriverFetch")
wait for DriverFetch_Snapshot(snap As QuerySnapshot)
Log($"Driver_Snapshot(${snap.Size},${snap})"$)
Dim meta As SnapshotMetadata = snap.Metadata
Dim documents As List = snap.Documents
'Log(documents)
If documents.IsInitialized Then
If documents.Size > 0 Then
For i = 0 To documents.Size-1
Dim docsnap As DocumentSnapshot = documents.Get(i)
CustomListView1.AddTextItem("Document: #"&i&": "&docsnap.Id,0)
Next
End If
Else
Log("Snapshot does not contain a list of Documents...")
End If
End If
and it gave me this error:
B4A Version: 8.80
Parsing code. (0.04s)
Building folders structure. (0.26s)
Compiling code. (0.42s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. (0.55s)
Compiling debugger engine code. (1.80s)
Compiling generated Java code. (2.44s)
Convert byte code - optimized dex. Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractMessageLite;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractMessageLite$Builder;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractMessageLite$Builder$LimitedInputStream;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractParser;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractProtobufList;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/BooleanArrayList;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/ByteBufferWriter;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/ByteOutput;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/ByteString;
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
at com.android.dx.command.dexer.Main.runMultiDex(Main.java:370)
at com.android.dx.command.dexer.Main.runDx(Main.java:291)
at com.android.dx.command.dexer.Main.main(Main.java:249)
at com.android.dx.command.Main.main(Main.java:94)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:684)
... 4 more
Parsing code. (0.04s)
Building folders structure. (0.26s)
Compiling code. (0.42s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. (0.55s)
Compiling debugger engine code. (1.80s)
Compiling generated Java code. (2.44s)
Convert byte code - optimized dex. Error
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractMessageLite;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractMessageLite$Builder;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractMessageLite$Builder$LimitedInputStream;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractParser;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/AbstractProtobufList;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/BooleanArrayList;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/ByteBufferWriter;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/ByteOutput;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/protobuf/ByteString;
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
at com.android.dx.command.dexer.Main.runMultiDex(Main.java:370)
at com.android.dx.command.dexer.Main.runDx(Main.java:291)
at com.android.dx.command.dexer.Main.main(Main.java:249)
at com.android.dx.command.Main.main(Main.java:94)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:684)
... 4 more
I have included all of the additional jars and patched my SDK to include com.google.protobuf
#AdditionalJar: com.google.android.gmslay-services-auth
#AdditionalJar: com.google.android.gmslay-services-base
#AdditionalJar: com.google.firebase:firebase-common
#AdditionalJar: com.google.firebase:firebase-auth
#AdditionalJar: com.google.firebase:firebase-database
#AdditionalJar: com.google.firebase:firebase-core
#AdditionalJar: com.google.firebase:firebase-common
#AdditionalJar: com.google.firebase:firebase-firestore
#AdditionalJar: com.google.gms:google-services
#AdditionalJar: grpc-core-1.20.0.jar
#AdditionalJar: grpc-protobuf-1.20.0.jar
#AdditionalJar: grpc-okhttp-1.20.0.jar
#AdditionalJar: grpc-android-1.20.0.aar
#AdditionalJar: opencensus-api-0.20.0.jar
#AdditionalJar: grpc-stub-1.20.0.jar
#AdditionalJar: grpc-protobuf-lite-1.20.0.jar
#additionaljar: protobuf-lite-3.0.1.jar
#AdditionalJar: opencensus-contrib-http-util-0.20.0.jar
#AdditionalJar: opencensus-contrib-grpc-metrics-0.20.0.jar
#AdditionalJar: grpc-context-1.20.0.jar
#AdditionalJar: glide-3.8.0.jar
#AdditionalJar: guava-27.1-android.jar
#ExcludeClasses: com.google.guava:guava-jdk5
#AdditionalJar: com.google.android.gmslay-services-base
#AdditionalJar: com.google.firebase:firebase-common
#AdditionalJar: com.google.firebase:firebase-auth
#AdditionalJar: com.google.firebase:firebase-database
#AdditionalJar: com.google.firebase:firebase-core
#AdditionalJar: com.google.firebase:firebase-common
#AdditionalJar: com.google.firebase:firebase-firestore
#AdditionalJar: com.google.gms:google-services
#AdditionalJar: grpc-core-1.20.0.jar
#AdditionalJar: grpc-protobuf-1.20.0.jar
#AdditionalJar: grpc-okhttp-1.20.0.jar
#AdditionalJar: grpc-android-1.20.0.aar
#AdditionalJar: opencensus-api-0.20.0.jar
#AdditionalJar: grpc-stub-1.20.0.jar
#AdditionalJar: grpc-protobuf-lite-1.20.0.jar
#additionaljar: protobuf-lite-3.0.1.jar
#AdditionalJar: opencensus-contrib-http-util-0.20.0.jar
#AdditionalJar: opencensus-contrib-grpc-metrics-0.20.0.jar
#AdditionalJar: grpc-context-1.20.0.jar
#AdditionalJar: glide-3.8.0.jar
#AdditionalJar: guava-27.1-android.jar
#ExcludeClasses: com.google.guava:guava-jdk5