I have been getting this issue.. followed the upgrade guide for new firebase sdk...saved the google services json file in app directory.. still the same error as you but for the database...
Caused by: java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…