【发布时间】:2012-05-07 18:27:54
【问题描述】:
我正在使用 eclipse 制作一个访问谷歌日历 API 的 android 应用程序 每当我尝试执行此方法时,都会收到 NoClassDefFoundError 异常
private void setupCalendarConnection(final String accessToken) throws IOException {
HttpTransport transport = AndroidHttp.newCompatibleTransport();// Here where the exception
GoogleCredential googleCredential = new GoogleCredential().setAccessToken(accessToken);
JacksonFactory jacksonFactory = new JacksonFactory();
我也尝试用
替换它HttpTransport 传输 = 新的 NetHttpTransport () ;
我遇到了同样的错误
05-07 20:08:04.513: E/AndroidRuntime(781): java.lang.NoClassDefFoundError: com.google.api.client.extensions.android2.AndroidHttp
根据我对 Java 的了解。这个异常意味着我试图访问的类不是由 classLoader 定义的,尽管我检查了依赖项和 JAR 文件,并且它被包含和导入
所以关于我如何解决这个问题的任何线索 提前谢谢你..
Eclipse 3.7 Indigo --- Google-java-client-api 1.8----Android ICS(4.0.3) Api lvl 15
【问题讨论】:
标签: java android noclassdeffounderror google-api-java-client