Firebase Java Admin SDK don't work

前端 未结 4 1300
暗喜
暗喜 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条回答
  •  旧时难觅i
    2021-01-07 06:47

    I found the problem, the problem was that the program will terminate before connecting to the Firebase server. What you need to do is to delay the termination of the program, by either calling Thread.sleep(20000);, or like I did it

    Scanner scanner = new Scanner(System.in);
    while(!scanner.nextLine().equals("Quit")){}
    System.exit(0);  
    

提交回复
热议问题