Closed chonghorizons closed 2 years ago
Update: Getting the build to work, but I'm now getting database not connecting errors.
D/FlutterActivity(23758): Using the launch theme as normal theme.
D/FlutterActivityAndFragmentDelegate(23758): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate(23758): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
D/FlutterActivityAndFragmentDelegate(23758): Attaching FlutterEngine to the Activity that owns this Fragment.
D/FlutterView(23758): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@5d7d4cc
D/FlutterActivityAndFragmentDelegate(23758): Executing Dart entrypoint: main, and sending initial route: /
Syncing files to device PH 1...
W/Gralloc3(23758): mapper 3.x is not supported
I/BiChannelGoogleApi(23758): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@335a92c
E/AccessibilityBridge(23758): VirtualView node must not be the root node.
D/FirebaseAuth(23758): Notifying id token listeners about user ( cfUQD68LScMy4g4zRPB1NwukeAC2 ).
D/FirebaseAuth(23758): Notifying auth state listeners about user ( cfUQD68LScMy4g4zRPB1NwukeAC2 ).
D/NetworkSecurityConfig(23758): No Network Security Config specified, using platform default
W/SyncTree(23758): Listen at / failed: DatabaseError: Permission denied
E/flutter (23758): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: DatabaseError(-3, Permission denied, )```
My hunch is this is a breaking change related to how firebase changed from 2017 to today. Still troubleshooting
I think I might have figured out my error. I think I didn't enable Realtime Database
and had Cloud Firestore
enabled instead.
Testing.
Can't get it to work with all the build.gradle stuff. I ended up making a new flutter project and copying the code in. That worked.
This repo works for me, but it is kinda a mess.
TODO later: figure out what the gradle and AndroidManifest changes were that allowed this to work.
Closing because it's old and other chat implementations have been shared. Underlying code is still interesting.
I am having problems building this repo after cloning the github. You can reproduce this by trying to clone this repo and then build it.
TLDR version:
Getting build errors that I couldn't fix. I think it may be just a needing to update old pubspec.yaml and build.gradle files (mostly). However, my attempts so far have failed. I'll keep trying.
Loved the memechat video from 2017. Want to try to study this code, but having problems with getting the firebase to run. (Yes, I checked google-services.json)
Build.gradle missing or old
The
android/app
level build.gradle is missing the firebase implementation documents. My guess: this is because firebase for flutter was different in 2017 vs today.One might need to add something like
The android level build.gradle has an older version of google services (from 2017).
AddListener type checks in 2020.
The addListener method gives a type checking error. This can be fixed by declaring the type. This is the fix I implemented.
Still can't build with Android Studio.
I'm still getting build errors with Android Studio. I've tried a few different things and they don't work.
If I don't include the
implementation
lines for firebase, I get Database can't connect errors. (makes sense... some files missing).If I do include them, I get other errors.
I also tried starting a blank flutter repo and then copying in the code. Similar errors.
Here is one set of the errors I am getting:
My flutter doctor in case it's helpful: