<bdo id='fzS1S'></bdo><ul id='fzS1S'></ul>
  • <small id='fzS1S'></small><noframes id='fzS1S'>

    <legend id='fzS1S'><style id='fzS1S'><dir id='fzS1S'><q id='fzS1S'></q></dir></style></legend>

    <i id='fzS1S'><tr id='fzS1S'><dt id='fzS1S'><q id='fzS1S'><span id='fzS1S'><b id='fzS1S'><form id='fzS1S'><ins id='fzS1S'></ins><ul id='fzS1S'></ul><sub id='fzS1S'></sub></form><legend id='fzS1S'></legend><bdo id='fzS1S'><pre id='fzS1S'><center id='fzS1S'></center></pre></bdo></b><th id='fzS1S'></th></span></q></dt></tr></i><div id='fzS1S'><tfoot id='fzS1S'></tfoot><dl id='fzS1S'><fieldset id='fzS1S'></fieldset></dl></div>

        <tfoot id='fzS1S'></tfoot>

      1. Play Store 上发布的应用程序无法与 Google Maps API 和 Facebook API 通信

        Published App on Play Store can#39;t communicate with Google Maps API and Facebook API(Play Store 上发布的应用程序无法与 Google Maps API 和 Facebook API 通信)

        <legend id='MnhxM'><style id='MnhxM'><dir id='MnhxM'><q id='MnhxM'></q></dir></style></legend>
            <tbody id='MnhxM'></tbody>

          <small id='MnhxM'></small><noframes id='MnhxM'>

        1. <tfoot id='MnhxM'></tfoot>

            <bdo id='MnhxM'></bdo><ul id='MnhxM'></ul>
              • <i id='MnhxM'><tr id='MnhxM'><dt id='MnhxM'><q id='MnhxM'><span id='MnhxM'><b id='MnhxM'><form id='MnhxM'><ins id='MnhxM'></ins><ul id='MnhxM'></ul><sub id='MnhxM'></sub></form><legend id='MnhxM'></legend><bdo id='MnhxM'><pre id='MnhxM'><center id='MnhxM'></center></pre></bdo></b><th id='MnhxM'></th></span></q></dt></tr></i><div id='MnhxM'><tfoot id='MnhxM'></tfoot><dl id='MnhxM'><fieldset id='MnhxM'></fieldset></dl></div>

                1. 本文介绍了Play Store 上发布的应用程序无法与 Google Maps API 和 Facebook API 通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用 Android Studio 创建了一个签名的 APK,并将我的 SHA1 指纹和我的应用程序中的相关 api 密钥添加到 Google 开发者控制台和 Facebook 控制台.如果我通过 USB 上传我签名的 apk,一切正常,在安装它之后,地图 API 和 facebook api 运行良好.如果我将相同的 apk 上传到 Play 商店,当我尝试使用 Facebook 登录时,它会显示无效的密钥哈希.密钥哈希 blablabla 与任何存储的..不匹配".因此,如果我在没有 facebook 的情况下登录,我什至无法获取我的谷歌地图;这让我认为 Play 商店中加载的 apk 会改变他的指纹或类似的东西.我检查了 Android Developers 和 Stackoverflow 上的所有内容,但我无法让它工作,因为奇怪的是,这个签名的发布 apk 在我将它加载到 Play 商店之前运行良好.

                  解决方案

                  终于解决了,问题可能是release中没有加载api提供的文件google_maps_api.xml,所以我

                  然后我注册了 2 个不同的密钥,每个密钥都有正确的 sha1 指纹,一个调试,另一个由 Google Play 控制台提供(不是上传证书,而是由 Google 生成的另一个).

                  非常感谢 Zuhad 和 Andy Developer 的启发.

                  I created a signed APK with Android Studio, and I added to Google Developer console and Facebook console my SHA1 fingerprint and the relative api keys in my app. Everything works well if I upload my signed apk via USB, after installing it maps API and facebook api works well. If I upload the same apk to the Play Store, when I try to login with Facebook, it says "invalid key hash. The key hash blablabla doesn't match with any stored..". So if I log without facebook, I can't even get my google maps; this leads me to think that the apk loaded on the play store changes his fingerprint or some stuff like that. I checked all the stuff on Android Developers and Stackoverflow, but I can't make it work, because the strange thing is that this signed release apk works well until I load it on the Play Store.

                  解决方案

                  I finally solved, the problem was probably that the file google_maps_api.xml provided by the api was not loaded in the release, so i

                  i did like that:

                  buildTypes {
                      debug {
                          manifestPlaceholders = [mapsKey: "AIzaSyB8o9KzQ5YN8U8AFS************"]
                      }
                      release {
                          minifyEnabled false
                          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                          manifestPlaceholders = [mapsKey: "AIzaSyApLacqgkdIR7uEpcf*****************"]
                      }
                  }
                  

                  and then in my AndroidManifest

                  <meta-data
                          android:name="com.google.android.geo.API_KEY"
                          android:value="${mapsKey}" />
                  

                  Reference: https://stackoverflow.com/a/33917692/3235560

                  then i registered 2 different keys each with the right sha1 fingerprint, one debug and the other given by Google Play console (not the upload certificate, but the other one generated by Google).

                  Very Very thanks to Zuhad and Andy Developer for inspiration.

                  这篇关于Play Store 上发布的应用程序无法与 Google Maps API 和 Facebook API 通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Android - Is it possible to get install referrer programmatically(Android - 是否有可能以编程方式安装引荐来源网址)
                  How to sign an APK with more than one certificate?(如何使用多个证书签署 APK?)
                  versionCode vs versionName in Android Manifest(Android Manifest 中的 versionCode 与 versionName)
                  What does this Google Play APK publish error message mean?(这个 Google Play APK 发布错误消息是什么意思?)
                  Lost my keystore for uploaded app on android market(丢失了我在 android 市场上上传的应用程序的密钥库)
                  App on Google Play always shows quot;Updatequot; instead of open(Google Play 上的应用程序总是显示“更新;而不是打开)
                      <bdo id='A1uTH'></bdo><ul id='A1uTH'></ul>

                      <i id='A1uTH'><tr id='A1uTH'><dt id='A1uTH'><q id='A1uTH'><span id='A1uTH'><b id='A1uTH'><form id='A1uTH'><ins id='A1uTH'></ins><ul id='A1uTH'></ul><sub id='A1uTH'></sub></form><legend id='A1uTH'></legend><bdo id='A1uTH'><pre id='A1uTH'><center id='A1uTH'></center></pre></bdo></b><th id='A1uTH'></th></span></q></dt></tr></i><div id='A1uTH'><tfoot id='A1uTH'></tfoot><dl id='A1uTH'><fieldset id='A1uTH'></fieldset></dl></div>

                        <legend id='A1uTH'><style id='A1uTH'><dir id='A1uTH'><q id='A1uTH'></q></dir></style></legend>

                        <small id='A1uTH'></small><noframes id='A1uTH'>

                            <tbody id='A1uTH'></tbody>

                        • <tfoot id='A1uTH'></tfoot>