Search code examples
androidkotlingoogle-apigoogle-drive-android-api

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.


Solution

  • 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.