简体   繁体   中英

Login to google drive programatically, using Google Drive API

Currently I am using java code (files) & kotlin code (file) in one app. kotlin file is only for google drive login & to access google drive files after login. But, I am facing an error of not able to login in drive for "Signed APK" mode. It works fine for "Debug apk" mode. Is there any version issue or anything in gradle file? Any help is appreciable.

Try this, it works for me

Step 1) Project Structure -> select project -> go to "signing" and select default or any keystore and fill proper details. In case you are not able to fill the details, click the green '+' button. Step 2) Goto Build Types -> select your build type and select your "Signing Config"-> select "config". Step 3) Create new SHA-1 key and add in google console credential.

If it is working fine for the Debug APK and not for the signed APK, then you need to create new SHA1 for the app using your KeyStore of the signed APK

Try below step it will create SHA1 for your application

Add Keystore path and alias

keytool -list -v -keystore ~path/KeyStore~ -alias ~alias ues in Keystore~

~path/KeyStore~ is the Path of your Keystore

~alias ues in Keystore~ is the Alias of the Keystore

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM