buildscript { dependencies { // add the following to the dependencies section classpath 'com.google.gms:google-services:4.3.3' } }
dependencies { // add the following at the bottom of the file implementation 'com.google.firebase:firebase-core:17.2.1' }
在Android Studio的顶部菜单栏中,选择Tools -> Firebase。
在Firebase工具窗口中,选择想要添加到项目中的Firebase服务(如Realtime Database、Cloud Messaging、Analytics等)。
单击'Connect to Firebase”按钮以连接项目到Firebase。
如果仍然无法显示Firebase助手,请尝试关闭Android Studio,并在重新打开后再次尝试以上步骤。