简体   繁体   中英

Could not sign in Google account on android emulator with react-native app

I have react-native app, and it works thru Google account. And when i launch my app on android emulator i can not sign in Google account. Get an error: "There was a problem communicating with Google servers. Try again later". My steps to reproduction:

  • Reinstalled app and android emulator.
  • Cleaned app and emulator cache.
  • Checked different emulators model with different API.
  • Tried to sign in Google account in android emulator from google chrome, from Settings => Accounts => Add Account => Google.

And all this steps is not working for me. Every time the same situation: the process of loading, spinner is launching about a minute, and after get an error: "Could not sign in". Can somebody help me please.

在此处输入图像描述

i have found the decision. The deal is my emulator was not connected to internet. My step was:

  1. Check environment emulator path and make sure it is like this - MacOS: ~/Library/Android/sdk/emulator, Windows: C:\Users%Username%\AppData\Local\Android\sdk\emulator.
  2. Check your available emulators list: emulator -list-avds.
  3. Run your available emulator with dns server set to 8.8.8.8: emulator @{YourEmulator} -dns-server 8.8.8.8. And after you can get access to Google from your android emulator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM