Android アプリ内で Google ドライブを使用しようとしています。今のところ、Google ドライブのファイル名のみを表示しようとしています。このチュートリアルhttps://developers.google.com/drive/quickstart-android を使用して、アプリで Google ドライブ アカウントをセットアップしました。このhttps://developers.google.com/drive/v2/reference/files/listファイルのリストを取得します。
そのためには、非同期タスクを作成する必要がありました。
private class getCloudContentTask extends AsyncTask<Void, Void, Void> {
protected void onPostExecute() {
updateList();
}
@Override
protected Void doInBackground(Void... arg0) {
cloudFiles = getCloudContent();
return null;
}
}
getCloudContent は基本的に、チュートリアルの retrieveAllFiles 関数です。
ただし、常にいくつかの警告とエラーが発生し、ファイルが表示されません。
01-09 19:39:31.347: W/dalvikvm(27926): VFY: unable to resolve static field 1488 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
01-09 19:39:31.347: D/dalvikvm(27926): VFY: replacing opcode 0x60 at 0x0004
01-09 19:39:31.446: W/GooglePlayServicesUtil(27926): Google Play services out of date. Requires 2012100 but found 1015
01-09 19:39:31.446: E/GoogleAuthUtil(27926): GooglePlayServices not available due to error 2
01-09 19:39:31.456: I/System.out(27926): An error occurred: com.google.api.client.googleapis.extensions.android.gms.auth.GooglePlayServicesAvailabilityIOException
Android SDK と最新の Google Play サービスを使用して、Eclipse Juno を最新の状態にインストールしています。エミュレートされたデバイスを使用しています。google-play-services.jar は、私のプロジェクトの参照ライブラリにあります。説明されているチュートリアルで説明されているように、google drive api v2 も含まれています。
どんな助けでも大歓迎です!