Android Question Firestore error update SDK

gregorio_adrian_gimenez

Active Member
Licensed User
Longtime User
Hi.

Hello everyone! I had some problems with firebase, to try to fix it I had to update the SDK, but it turned out that now I have problems with Firestore, and I need to solve it with some urgency. after updating the SDK I have an error missing the artifact "Maven artifact not found: com.google.firebase / firebase-database-collection" Although it is installed correctly, the error remains until I delete the additional # associated with Firestore. This stops generating the missing artifact error, but generates this other error.
"
B4A line: 354
Dim docsnap As DocumentReference = value
src\com\intelliquestion\youspeak\mensajes_privados.java:1240: error: package com.google.firebase.firestore does not exist
_docsnap = (de.donmanfred.DocumentReferencewrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new de.donmanfred.DocumentReferencewrapper(), (com.google.firebase.firestore.DocumentReference)(_value));"

B4X:
Sub contactos_onValue(success As Boolean, value As Object)
   
    Log($"Driver_onValue(${success},${value})"$)
    Dim docsnap As DocumentReference = value  ' <----line 354
    Log( docsnap.Path )
   

End Sub


firestore version is V0.67

if i reinsert the line #AdditionalJar: com.google.firebase: firebase-firestore, it again generates the missing artifact error "Maven artifact not found: com.google.firebase / firebase-database-collection"

com.google.firebase / firebase-database-collection version 17.0.1 is installed
regards
 

DonManfred

Expert
Licensed User
Longtime User
to try to fix it I had to update the SDK, but it turned out that now I have problems with Firestore, and I need to solve it with some urgency
I suggest to reinstall the SDK and not to update it for now.
I guess there must be a new implementation for the SDK to implement. As long as there is no new implementation i suggest to use the SDK as it.
 
Upvote 0

gregorio_adrian_gimenez

Active Member
Licensed User
Longtime User
Hello everyone!
if it is correct, I had to install the SDK again since I could not run the code in any way ( debug or release, usb or bridge or simulator), due to a fatal firebase error, so I cannot use the previous SDK because it does not work either

so I don't see a solution to the problem ?


reinstall the SDK for an error similar to this

java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[class com.google.firebase.iid.FirebaseInstanceId]>{1, type=0, deps=[Dependency{anInterface=interface com.google.firebase.platforminfo.UserAgentPublisher, type=required, direct=true}, Dependency{anInterface=class com.google.firebase.FirebaseApp, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.heartbeatinfo.HeartBeatInfo, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.events.Subscriber, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.installations.FirebaseInstallationsApi, type=required, direct=true}]}: interface com.google.firebase.installations.FirebaseInstallationsApi
at android.app.ActivityThread.installProvider(ActivityThread.java:6537)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6025)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5931)
at android.app.ActivityThread.access$1200(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6810)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[class com.google.firebase.iid.FirebaseInstanceId]>{1, type=0, deps=[Dependency{anInterface=interface com.google.firebase.platforminfo.UserAgentPublisher, type=required, direct=true}, Dependency{anInterface=class com.google.firebase.FirebaseApp, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.heartbeatinfo.HeartBeatInfo, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.events.Subscriber, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.installations.FirebaseInstallationsApi, type=required, direct=true}]}: interface com.google.firebase.installations.FirebaseInstallationsApi
at com.google.firebase.components.ComponentRuntime.validateDependencies(com.google.firebase:firebase-components@@16.0.0:170)
at com.google.firebase.components.ComponentRuntime.processInstanceComponents(com.google.firebase:firebase-components@@16.0.0:89)
at com.google.firebase.components.ComponentRuntime.<init>(com.google.firebase:firebase-components@@16.0.0:73)
at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@19.3.0:418)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:300)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:268)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@19.3.0:253)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@19.3.0:51)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1927)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1902)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@19.3.0:45)
at android.app.ActivityThread.installProvider(ActivityThread.java:6532)
... 10 more
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Dependency{anInterface=interface com.google.firebase.installations.FirebaseInstallationsApi, type=required, direct=true}]}: interface com.google.firebase.installations.FirebaseInstallationsApi
Sounds like you are still using an updated SDK.

Install it again based on the instructions here:
 
Upvote 0

gregorio_adrian_gimenez

Active Member
Licensed User
Longtime User
Hi Don!

Hello, Mr! over there my english is very bad. When reinstalling the SDK, that error disappears, but those associated with Firestore that generated this thread are lost.
o_O
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

gregorio_adrian_gimenez

Active Member
Licensed User
Longtime User
I'll try to explain myself a little better, sorry.
The steps that apply are the following:

1. reinstall SDK

2. Update the artifacts with SDK manager.

3. when I run the code it tells me that "Maven artifact not found: com.google.firebase / firebase-database-collection" is missing. This artifact is actually installed. version 17.0.1.

4. if I remove the additional JAR #AdditionalJar: com.google.firebase: firebase-firestore, trying to run the code generates this new error
"Compiling generated Java code. Error
B4A line: 354
Dim docsnap As DocumentReference = value '<----
src \ com \ intelliquestion \ youspeak \ private_messages.java: 1240: error: package com.google.firebase.firestore does not exist
_docsnap = (de.donmanfred.DocumentReferencewrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper (new de.donmanfred.DocumentReferencewrapper (), (com.google.firebase.firestore.DocumentReference) (_ value));
^ "

So for some reason if we insert the line #AdditionalJar: com.google.firebase: firebase-firestore, it causes the program to consider that the "Maven artifact not found: com.google.firebase / firebase-database-collection" is missing.

regards
 
Upvote 0
Top