android - GoogleApiClient.ConnectionCallbacks 编译时错误

标签 android google-drive-api google-api-client

我应该使用 Google Drive Bat 我无法编译此 Activity

package com.google.android.gms.drive.sample.demo;

import android.app.Activity;
import android.content.Intent;
import android.content.IntentSender.SendIntentException;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

/**
 * An abstract activity that handles authorization and connection to the Drive
 * services.
 */
public abstract class BaseDemoActivity extends Activity implements
        GoogleApiClient.ConnectionCallbacks,
        GoogleApiClient.OnConnectionFailedListener {
...

我使用 Google Plugin for Eclipse 来安装库和 google API 但由于编译错误

GoogleApiClient cannot be resolved to a type

最佳答案

关注Google+ Platform Quickstart for Android以便将 Google Play 服务安装为库项目

特别参见步骤 5:

5. Import the Google Play Services library project.

    Select File > Import > Android > Existing Android Code Into Workspace and click Next.
    Select Browse.... Enter <android-sdk-folder>/extras/google/google_play_services/.
    Select google-play-services_lib. Click Finish to import.

关于android - GoogleApiClient.ConnectionCallbacks 编译时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22622184/

相关文章:

java - 我如何在其他 View 之后绘制某些 View ?

java - 如何提高Java中搜索特定Google Drive文件的效率?

Android CheckBoxPreference java.lang.StackOverflowError

android - 使用 Canvas 的 3d 立方体。需要一点改进

google-drive-api - 团队云端硬盘文件的 Google 云端硬盘 REST API 结果不完整

javascript - 将缓冲区直接上传到 Google Cloud Storage

google-chrome - Youtube API Oauth 验证的 Chrome 控制台错误,拒绝显示 : in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'

gmail - 使用新的 REST API 获取您为 gmail IMAP 获取的 UID

android - 在 Eclipse 中编译的替代方案?

python - 如何列出 Google 云端硬盘文件夹的所有文件、文件夹、子文件夹和子文件