0

Well am using eclipse to make an android app which accesses google calendar API am getting a NoClassDefFoundError Exception whenever i tried to execute this method

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();

also i tried to replace it with

HttpTransport transport = new NetHttpTransport () ;

and i got the same error

05-07 20:08:04.513: E/AndroidRuntime(781): java.lang.NoClassDefFoundError: com.google.api.client.extensions.android2.AndroidHttp

From my knowledge in Java.. This exception means that the class am trying to access is not defined by classLoader ALTHOUGH i checked the dependencies and JAR files included and it is included and imported

So any clue about how can i solve this problem Thank you in advance..

Eclipse 3.7 Indigo --- Google-java-client-api 1.8----Android ICS(4.0.3) Api lvl 15

4

2 回答 2

0

Go to your build path in Eclipse via Project >> Properties, then Java Build Path. Under the tab Order and Export, tick the library you are importing.

于 2012-05-07T18:39:36.607 回答
0

Problem Solved when i headed for Netbeans instead of Eclipse and imported my Jars manually in the libs folder... automatically added to Project and it is running like a fire horse.

于 2012-05-11T22:19:52.490 回答