簡體   English   中英

發布的APK無法登錄

[英]Released apk is not able to login

我無法登錄到已發布的APK,但調試APK正常運行。 google_services.json文件丟失,無法發布apk,我不明白為什么會這樣。 請有人幫我解決這個問題。 下面我列出了我的應用程序級別的依賴關系。

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.wrapp.floatlabelededittext:library:0.0.6'
compile 'com.google.code.gson:gson:2.3.1'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.github.nirhart:parallaxscroll:1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.aakira:expandable-layout:1.4.2@aar'
compile 'de.hdodenhof:circleimageview:2.1.0'

compile 'com.loopj.android:android-async-http:1.4.6'

compile 'com.google.android.gms:play-services:8.1.0'
compile files('libs/opencsv-2.2.jar')
compile files('libs/google-play-services_lib.jar')
}
apply plugin: 'com.google.gms.google-services'

項目級依賴

dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'
    classpath 'com.google.gms:google-services:2.1.0'
}

我收到此錯誤E/TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE E/TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE請任何人幫助我。

您需要從Cloud Console更新發行版本的SHA-1。

  • 開啟https://console.cloud.google.com/
  • 從頂部的下拉菜單中選擇您的應用程序
  • API和服務->憑證
  • 也為發行版添加帶有SHA-1的密鑰。 (您可能已經注冊了調試密鑰)

更新:將簽名配置添加到應用程序的build.gradle文件中,並從gradle任務中運行singingReport報告。

android {
    ...
    signingConfigs {
        release {
            storeFile file("release-key.keystore")
            storePassword 'passwotd'
            keyAlias 'alias'
            keyPassword 'password'
        }
    }

    buildTypes {
        release {
            ...
            signingConfig signingConfigs.release
        }

        debug {
            debuggable true
        }
    }
}
...

現在,點擊右側面板上Android Studio中的“ Gradle”按鈕。 單擊“項目名稱”->“:app”->“任務”->“ android”->雙擊“ signingReport”

完成后,單擊右下角的“ Gradle Console”。 它將顯示所有鍵的所有SHA-1。

找到發行版本密鑰的SHA-1。

希望能幫助到你

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM