我尝试让Google Quickstart项目在Android上运行。 https://developers.google.com/drive/quickstart-android。我注意到有很多类似的问题 - 并且想知道是否有一个样本项目在哪个地方有用?
我按照说明操作但启动时出错: 06-10 00:15:04.904:E / AndroidRuntime(16613):致命异常:主要 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);
答案 0 :(得分:0)
您应该使用Google API定位API级别,并确保Google API客户端库jar位于您的构建路径中。