我试着让Google Quickstart项目在Android上工作。https://developers.google.com/drive/quickstart-android。我注意到在这个问题上有很多类似的问题--我想知道是否有一个样例项目可以工作?
我按照说明操作,但启动时出现错误: 06-10 00:15:04.904: E/AndroidRuntime(16613):FATAL EXCEPTION: main 06-10 00:15:04.904: E/AndroidRuntime(16613):java.lang.NoClassDefFoundError: com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential
它指的是这一行:
credential = GoogleAccountCredential.usingOAuth2(this, DriveScopes.DRIVE);
startActivityForResult(credential.newChooseAccountIntent(), REQUEST_ACCOUNT_PICKER);
发布于 2013-06-10 21:04:35
您应该以Google API的API级别为目标,并确保Google API客户端库jars位于您的构建路径上。
https://stackoverflow.com/questions/17015124
复制相似问题