statusCode=DEVELOPER_ERROR in google login

后端 未结 7 946
萌比男神i
萌比男神i 2020-12-19 10:35

Below code I am using for Google login.I added google-services.json file in the app folder.I am using classpath \'com.google.gms:google-services:2.0.0

相关标签:
7条回答
  • 2020-12-19 11:15

    It's likely that your issue is in that you picked the SHA1 from the ~/.android/debug.keystore, but not using it to sign your build.

    1. Go to the module options Signing tab and add a profile with the only field Store File set to /Users/<your_user>/.android/debug.keystore

    2. On the Flavors tab pick it in the Signing Config drop-down.

    3. On the Build Types tab pick it in the Signing Config drop-down for your build type (likely to be Debug).

    4. Cleanup and rebuild.

    0 讨论(0)
  • 2020-12-19 11:15

    Thanks Aleksey Gureiev for hinting... I solved my problem by making sure debug keys are actually used during builds..

    For me in Android Studio the issue was the Signing Config was not set at all. I am still wondering how it happened.

    Once I set Signing Config to my config with name "debug" then it all started working.

    0 讨论(0)
  • 2020-12-19 11:22

    If you are working in two computer different, you have to generate the SHA1 again and add to console.firebase.google.com, download the google-service.json and add in your project

    0 讨论(0)
  • 2020-12-19 11:26

    Use .requestIdToken(BACKEND_CLIENT_ID) with your GoogleSignInOptions.

    How to get the BACKEND_CLIENT_ID can be found here: https://developers.google.com/identity/sign-in/android/start-integrating#get_your_backend_servers_oauth_20_client_id

    Hope this helped!

    0 讨论(0)
  • 2020-12-19 11:28

    I have same problem and this solution has worked. Hope this will help you and others.

    Apply the plugin: 'com.android.application'

    android {
        compileSdkVersion 25
        buildToolsVersion "25.0.3"
        defaultConfig {
    

    Make Sure this applicationId is same as your package name in Manifest file (Upper case and lower case matters)

            applicationId "com.example" 
            minSdkVersion 17
            targetSdkVersion 25
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    0 讨论(0)
  • 2020-12-19 11:38

    I faced the same issue with my React Native project.

    I had to generate SHA-1 key using debug.keystore in android/app folder.

    Run the below command in the terminal after changing your directory to cd C:\Program Files\Java\jdk1.8.0_251\bin. (You may have a different JDK version).

    keytool -list -v -keystore "D:\{ProjectName}\android\app\debug.keystore" -alias androiddebugkey -storepass android -keypass android

    0 讨论(0)
提交回复
热议问题