I am using Google Drive API V2 version to create a folder and upload a file into the folder. It works perfectly fine on a debug build, but on a release build, the file.getId() is null for the folder.
Here is the image of the untitled folder that it creates: https://ibb.co/fJMyAK
You can find complete documentation at: https://developers.google.com/drive/api/v2/folder
File fileMetadata = new File();
fileMetadata.setTitle("Invoices");
fileMetadata.setMimeType("application/vnd.google-apps.folder");
File file = driveService.files().insert(fileMetadata)
.setFields("id")
.execute();
System.out.println("Folder ID: " + file.getId());
I can see that the folder is being created on google drive, but it shows up as untitled.
I have gone into Google Api console, ensured that the release build keystore SHA1 key is entered correctly into api console and the package name is correct.
Any help on this would be appreciated!