我一直试图将Flutter应用程序连接到Firebase数据库。 我在SO上看到了很多关于在Firebase控制台上设置规则的文章。 所以我将Firebase数据库的规则设置为-
lst = ['25 birds, 1 cat, 4 dogs, 101 ants']
nums = []
for item in lst:
for word in item.split():
if word.isdigit():
nums.append(int(word))
print(nums)
# [25, 1, 4, 101]
它显示的应用日志只是-
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}
// tried replacing /{database}/ with /carpool/ as well.
我尝试在计算机上安装Firebase数据库仿真器,并尝试浏览至-Restarted application in 2,266ms.
6.7.0 - [Firebase/Database][I-RDB038012] Listener at /carpools failed: permission_denied
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: DatabaseError(1, com.firebase, Permission Denied)
null
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: DatabaseError(1, com.firebase, Permission Denied)
null
[C3.1 22AA375D-032C-49AD-A4ED-7336EC822174 192.168.86.81:62896<->172.217.14.206:443]
Connected Path: satisfied (Path is satisfied), interface: en0
Duration: 0.122s, DNS @0.001s took 0.020s, TCP @0.023s took 0.004s, TLS took 0.038s
bytes in/out: 3634/762, packets in/out: 9/8, rtt: 0.002s, retransmitted packets: 0, out-of-order packets: 0
6.7.0 - [Firebase/Analytics][I-ACS023130] Configuration not found. Using default configuration
[C4.1 388516BA-533E-415F-95B2-2CAFE537C97E 192.168.86.81:62897<->172.217.14.206:443]
Connected Path: satisfied (Path is satisfied), interface: en0
Duration: 0.069s, DNS @0.001s took 0.005s, TCP @0.009s took 0.003s, TLS took 0.036s
bytes in/out: 3658/1358, packets in/out: 9/9, rtt: 0.002s, retransmitted packets: 0, out-of-order packets: 0
,但仅返回http://localhost:9000/carpools.json?ns=carpools
。我尝试浏览到确切的文档,但是也返回了null
。
我在这里到底想念什么?