小编Ket*_*eke的帖子

无法在 Flutter 中使用 Firebase Auth 进行注册

我正在为我的应用程序使用 Firebase,我已正确设置所有内容,并且 Firebase Firestore 工作正常,没有任何问题,我能够在那里读取和写入数据,但是当我尝试在 Firebase 中创建用户时,我在调试控制台中收到此消息:

\n\n
I/BiChannelGoogleApi( 2228): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@fc008c3\nW/DynamiteModule( 2228): Local module descriptor class for com.google.firebase.auth not found.\nI/FirebaseAuth( 2228): [FirebaseAuth:] Preparing to create service connection to gms implementation\nI/lutter_firebase( 2228): type=1400 audit(0.0:1201): avc: denied { sendto } for path="/dev/socket/logdw" scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:init:s0 tclass=unix_dgram_socket permissive=1\nE/GmsClientSupervisor( 2228): Timeout waiting for ServiceConnection callback com.google.firebase.auth.api.gms.service.START\nE/GmsClientSupervisor( 2228): java.lang.Exception\nE/GmsClientSupervisor( 2228):   at com.google.android.gms.common.internal.zze.handleMessage(Unknown Source:53)\nE/GmsClientSupervisor( 2228):   at android.os.Handler.dispatchMessage(Handler.java:101)\nE/GmsClientSupervisor( 2228):   at com.google.android.gms.internal.common.zze.dispatchMessage(Unknown Source:8)\nE/GmsClientSupervisor( 2228):   at android.os.Looper.loop(Looper.java:164)\nE/GmsClientSupervisor( 2228):   at android.app.ActivityThread.main(ActivityThread.java:6541)\nE/GmsClientSupervisor( 2228):   at java.lang.reflect.Method.invoke(Native Method)\nE/GmsClientSupervisor( 2228): …
Run Code Online (Sandbox Code Playgroud)

android firebase firebase-authentication flutter

5
推荐指数
1
解决办法
3711
查看次数

无法清除反应本机应用程序中的setInterval

我有这个非常简单的应用程序,我正在尝试实现倒计时,Start并且Stop功能似乎工作正常,但是当我按 时Stop, 的值seconds没有在视图中更新,这是所需的行为,但是当我观察控制台日志时,它显示sec我猜不断变化的值表明该值setInterval仍在运行且未清除。

这是附带的代码:

import React, { useState, useEffect } from "react";
import {
  StyleSheet,
  Text,
  View,
  StatusBar,
  TouchableOpacity,
  Dimensions,
} from "react-native";

const screen = Dimensions.get("screen");

export default function App() {
  const [seconds, setSeconds] = useState(4);
  const [start, setStartToggle] = useState(true);
  let [fun, setFun] = useState(null);
  const getRemaining = () => {
    const minute = Math.floor(seconds / 60);
    const second = seconds - minute * 60;
    return …
Run Code Online (Sandbox Code Playgroud)

javascript setinterval countdowntimer react-native

2
推荐指数
1
解决办法
1209
查看次数