Issue
The error is:
D/ShopsCollectionDisplaye: FromDBToShopsCollection: Doc{id=shop_test_Fb_1, shopImg=2131165326}
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.app.tacaalacaraman.wortheat, PID: 10527
java.lang.RuntimeException: Could not deserialize object. Failed to convert value of type java.lang.Long to String (found in field 'shopImg')
Cause now my app uses a string and so does my program, but my Android Device Does Not update the code or something like
Solution
Finally was cause Firestore was using db in cache(Persistance). So I had to disable Persistance with FirebaseFirestoreSettings
:
private FirebaseFirestore db = FirebaseFirestore.getInstance();
private FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()
.setPersistenceEnabled(false)
.build();
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
....
db.setFirestoreSettings(settings);
....
Answered By - Maespi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.