//apply plugin: 'com.google.gms.google-services'
안드로이드 스튜디오에서 google-services 3.0.0 버전 이후로는 위 플러그인을 추가하지 않아야 된다는 글을 읽고 주석처리를 했더니
Firebase를 사용하는 부분에서 아래와 같은 에러가 났다.
[ +4 ms] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): Failed to handle method call
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): java.lang.IllegalStateException: FirebaseApp with name [DEFAULT] doesn't exist.
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at com.google.firebase.FirebaseApp.getInstance(com.google.firebase:firebase-common@@19.0.0:214)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin.getAuth(FirebaseAuthPlugin.java:79)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin.onMethodCall(FirebaseAuthPlugin.java:93)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at android.os.MessageQueue.nativePollOnce(Native Method)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at android.os.MessageQueue.next(MessageQueue.java:336)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at android.os.Looper.loop(Looper.java:174)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at android.app.ActivityThread.main(ActivityThread.java:7356)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at java.lang.reflect.Method.invoke(Native Method)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
[ ] E/MethodChannel#plugins.flutter.io/firebase_auth(11157): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
[ +10 ms] I/flutter (11157): PlatformException(error, FirebaseApp with name [DEFAULT] doesn't exist. , null)
Stackoverflow에서 다음과 같은 답변을 발견했다.
google-services 문구를 다시 추가하라는?!?!?!??!?!?!
https://stackoverflow.com/a/37362146/6284384
추가했더니 위 에러가 다시 발생하지는 않지만 이전 에러가 발생한다. ㅠㅠ
다시 방법을 찾아봐야겠다.