While trying to use any Drive class function:
Drive service = new Drive.Builder(AndroidHttp.newCompatibleTransport(),new GsonFactory(), credential).build();
I believe you have not included google-api-client-1.18.0-rc.jar
library, that is the reason you are getting the exception.
Once you download and unzip the Drive API library, please read the drive/readme.html
. It has listed the dependent jars for google-api-services-drive-v2-rev123-1.18.0-rc.jar
that need to be included. The dependent jars can be located in drive/libs
folder.
Following are the complete set of jars that need to be included for Android application: