I am trying to design an app which uses HttpTransport in my Android project but, on calling the import, it throws the below Logcat errors.
E/dalvikvm(481): Could not find class 'com.google.api.client.http.javanet.NetHttpTransport', referenced from method com.test.main.MyActivity.<clinit>
W/dalvikvm(413): VFY: unable to resolve new-instance 75 (Lcom/google/api/client/http/javanet/NetHttpTransport;) in Lcom/test/main/MyActivity
W/dalvikvm(481): VFY: unable to find class referenced in signature (Lcom/google/api/client/http/HttpTransport;)
I/dalvikvm(481): Failed resolving Lcom/test/main/MyActivity$2; interface 71 'Lcom/google/api/client/http/HttpRequestInitializer;'
D/dalvikvm(481): VFY: dead code 0x0002-0009 in Lcom/test/main/MyActivity;.createRequestFactory (Lcom/google/api/client/http/HttpTransport;)Lcom/google/api/client/http/HttpRequestFactory;
E/dalvikvm(481): Could not find class 'com.google.api.client.http.GenericUrl', referenced from method
I’ve tried searching in the site for solutions but they look hazy or not worth the need. Can somebody tell me what am I doing wrong here?
I’ve imported all the dependencies JARs in my project but still, it doesn’t work.
I use Google API Version 1.8.3.
Main source: google-api-java-client-1.8.3-beta.jar
All dependencies are included for the above JAR in the .zip file inclusive of external JARs that have been recommended by Google.
Problem solved. Happens like the import wasn’t proper.
Plus it is that, I had to link it properly in Eclipse under Libraries.
I used com.google.api.client.http.ApacheHttpTransport than the standard library suggesteed by Eclipse.
And now it works.
Cheers!