我正在关注FirebaseUI official example,但是当我在选择Google帐户后尝试测试Google登录选项时,该应用仍然没有响应。 Logcat显示以下错误:
2018-11-06 18:51:39.779 1929-1940/? W/Conscrypt: Could not set socket write timeout: java.net.SocketException: Socket closed
2018-11-06 18:51:39.780 1929-1940/? W/Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@14366022@14.3.66 (040700-213742215):2)
2018-11-06 18:51:39.780 1929-1940/? W/Conscrypt: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.setSoWriteTimeout(:com.google.android.gms@14366022@14.3.66 (040700-213742215):2)
2018-11-06 18:51:39.895 1929-1940/? W/Conscrypt: Could not set socket write timeout: java.net.SocketException: Socket closed
2018-11-06 18:51:39.895 1929-1940/? W/Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@14366022@14.3.66 (040700-213742215):2)
2018-11-06 18:51:39.895 1929-1940/? W/Conscrypt: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.setSoWriteTimeout(:com.google.android.gms@14366022@14.3.66 (040700-213742215):2)
2018-11-06 18:51:40.216 1929-1940/? W/GLSUser: [AppCertManager] IOException while requesting key:
java.io.IOException: Invalid device key response.
at hol.a(:com.google.android.gms@14366022@14.3.66 (040700-213742215):13)
at hol.a(:com.google.android.gms@14366022@14.3.66 (040700-213742215):61)
at hol.a(:com.google.android.gms@14366022@14.3.66 (040700-213742215):23)
at hoj.a(:com.google.android.gms@14366022@14.3.66 (040700-213742215):2)
at hoj.a(:com.google.android.gms@14366022@14.3.66 (040700-213742215):9)
at xfj.a(:com.google.android.gms@14366022@14.3.66 (040700-213742215):3)
at cje.onTransact(:com.google.android.gms@14366022@14.3.66 (040700-213742215):4)
at android.os.Binder.transact(Binder.java:604)
at dly.onTransact(:com.google.android.gms@14366022@14.3.66 (040700-213742215):3)
at android.os.Binder.execTransact(Binder.java:674)
2018-11-06 18:51:40.216 1929-1940/? W/GLSUser: [DeviceKeyStore] Cannot load key: Device key file not found.
2018-11-06 18:51:40.399 2513-5726/? W/Conscrypt: Could not set socket write timeout: java.net.SocketException: Socket closed
2018-11-06 18:51:40.400 2513-5726/? W/Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@14366022@14.3.66 (040700-213742215):2)
2018-11-06 18:51:40.400 2513-5726/? W/Conscrypt: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.setSoWriteTimeout(:com.google.android.gms@14366022@14.3.66 (040700-213742215):2)
2018-11-06 18:51:40.650 2513-5726/? W/Conscrypt: Could not set socket write timeout: java.net.SocketException: Socket closed
2018-11-06 18:51:40.651 2513-5726/? W/Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@14366022@14.3.66 (040700-213742215):2)
2018-11-06 18:51:40.651 2513-5726/? W/Conscrypt: at com.google.android.gms.org.conscrypt.ConscryptFileDescriptorSocket.setSoWriteTimeout(:com.google.android.gms@14366022@14.3.66 (040700-213742215):2)
2018-11-06 18:51:40.975 2513-5726/? E/Volley: [502] BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyAssertion?alt=proto&key=AIzaSyDGPA5UVAhDEXzbDftSdn9-vCezXFvz3-w
2018-11-06 18:51:40.975 2513-8927/? I/AuthChimeraService: Error description received from server: OPERATION_NOT_ALLOWED
2018-11-06 18:51:40.978 2513-8927/? W/FirebaseAuth: [PhoneNumberAuthPostProcessor] postProcess starts
2018-11-06 18:51:40.978 2513-8927/? W/FirebaseAuth: [PhoneNumberAuthPostProcessor] postProcess ends
2018-11-06 18:51:41.270 1386-1622/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 8924113 , only wrote 8770320
答案 0 :(得分:0)
原来,我只需要在Firebase项目控制台的“身份验证”标签中启用Google登录方法即可。