如何将我的SQLITE DB保存到Google云端硬盘



我已经尝试了 6+ 示例项目,但所有项目都给出了相同的响应:

GoogleApiClient connection failed: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{e00b1fb: android.os.BinderProxy@e266432}, message=null}

谷歌云端硬盘 API 不需要任何客户端 ID 或访问令牌。我也尝试了谷歌官方项目:

https://github.com/googledrive/android-quickstart
https://github.com/googledrive/android-demos&https://www.numetriclabz.com/integrate-google-drive-in-android-tutorial/

所有这些只需显示Google登录屏幕,然后单击帐户后,它一次又一次地显示相同的屏幕。现在我无法理解这个问题。请给我一个解决方案或方法来解决这个问题。

谢谢

最后,我按照以下步骤解决了这个问题:

  1. 通过此评论生成我的调试密钥库或应用程序的密钥库的SHA1密钥

    keytool -exportcert -alias androiddebugkey -keystore/Users/..your_path../.android/debug.keystore -list -v

  2. 在以下位置创建项目: https://developers.google.com/mobile/add

  3. 从以下位置启用驱动器 API:https://console.developers.google.com
    并从"凭据"选项卡中通过 SHA1 密钥和包名称创建 API 密钥。

仅此而已:)

最新更新