i'm testing Android DriveQuickstart with Google Drive API, while trying out the sample code to access Drive using API i got the following error.
400 Bad Request message: Invalid field selection items
400: Bad Request
User error. This can mean that a required field or parameter has not been provided, the value supplied is invalid, or the combination of provided fields is invalid.
This error must be referring to this line of code:
FileList result = mService.files().list()
.setPageSize(10)
.setFields("nextPageToken, items(id, name)")
.execute();
Change .setFields("nextPageToken, items(id, name)")
to
setFields("nextPageToken, files(id, name)")