【发布时间】:2014-10-25 07:02:32
【问题描述】:
我正在将项目从 Eclipse ADT 迁移到 Android Studio。在我运行该项目之前进展顺利。
我收到了几个包不存在错误:
Error:(34, 41) error: package com.google.api.client.http.apache does not exist
Error:(81, 19) error: cannot find symbol variable transport
Error:(81, 36) error: cannot find symbol class ApacheHttpTransport
Error:(170, 27) error: cannot find symbol variable transport
Error:(170, 44) error: cannot find symbol class ApacheHttpTransport
这些包与 Google 的 API 客户端库有关。我通过扫描Maven Repository page手动添加了依赖项:
compile 'com.google.api.client:google-api-client-auth-oauth:1.2.3-alpha'
compile 'com.google.api.client:google-api-client-http:1.2.3-alpha'
compile 'com.google.api.client:google-api-client-apache:1.2.3-alpha'
但是,我似乎无法为 com.google.api.client.http.apache 找到正确的依赖项。有人愿意分享添加此依赖项的正确方法吗?
【问题讨论】:
标签: android android-studio packages android-gradle-plugin google-api-java-client