androidapigoogle-mapsmapactivity

Api key android make "couldn't get connection factory client"?


i'am really beginner in android. i want to ask some questions. thank you for answer :)

  1. how we know if our API key doesn't match with our keystore
  2. which one i must to use Sha1 or Md5 to get my API key in google console? because some blog or website say use Sha1 and the other say use Md5.

i've problem when running the mapactivity , error "couldn't get connection factory client" like this MapActivity couldn't get connection factory client and this https://stackoverflow.com/questions/20537934/couldnt-get-connection-factory-client-mapactivity-android.

the problem above is the reason i ask the question.thank you so much :)


Solution

  • Firstly, sory for the late answer :). You must use sha1 fingerprint to generate new api-key. You can get your sha1 with your .keystore file. In debug mode with debug.keystore file you can get sha1. But this will not work after you publish your app with debug api-key. You should generate release api-key for it. Firstly you must sign your app and create new private .keystore file. Then you can get sha1 with this private keystore file. After that, you can generate release api-key for your app.