开发者

Failed Linking Google API in Android Application

开发者 https://www.devze.com 2023-02-07 16:50 出处:网络
I\'m using开发者_开发问答 the Java Google APIs for an Android application.I followed the usage pattern described here for Authenication and API use: http://goo.gl/rPZ9Z

I'm using开发者_开发问答 the Java Google APIs for an Android application. I followed the usage pattern described here for Authenication and API use: http://goo.gl/rPZ9Z

The problem I'm having is that the call to GoogleTransport.create() throws a NoClassDefFoundException. I looked at the log and the HttpHeaders class is not linking properly. I attached the Google API JAR file using the normal method in eclipse and all other classes I'm using are working correctly. Problem is that this one class in particular is not linked correctly. Here are some logs of the app running but not calling the class:

01-27 14:04:34.390: WARN/dalvikvm(422): Link of class 'Lcom/google/api/client/http/HttpHeaders;' failed

01-27 14:04:34.400: WARN/dalvikvm(422): Unable to resolve superclass of Lcom/google/api/client/googleapis/GoogleHeaders; (43)

Log of direct call to GoogleTransport.create():

01-27 16:13:11.882: ERROR/AndroidRuntime(16086): java.lang.NoClassDefFoundError: com.google.api.client.http.HttpHeaders 01-27 16:13:11.882: ERROR/AndroidRuntime(16086): at com.google.api.client.http.HttpTransport.(HttpTransport.java:145) 01-27 16:13:11.882: ERROR/AndroidRuntime(16086): at com.google.api.client.googleapis.GoogleTransport.create(GoogleTransport.java:58)

Thanks in advance!


Sounds like your project references are messed up. Try checking the library dependencies.

0

精彩评论

暂无评论...
验证码 换一张
取 消