Firebase Java Admin SDK don't work

前端 未结 4 1271
暗喜
暗喜 2021-01-07 05:59

I am following the documentation on Firebase website on setting up an Java Admin SDK. So I add the dependency to the build.gradle, and added the following code:



        
4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-07 06:48

    One other thing you can try is to explicitly wait until the setValue() task is complete using the Tasks API:

    Task task = usersRef.setValue(users);
    try {
        Tasks.await(task);
    } catch (ExecutionException | InterruptedException e) {
        // Handle error if necessary
    }
    

提交回复
热议问题