0
votes

I am new with YouTube APIs. I have downloaded WatchMe project from

https://github.com/youtube/yt-watchme

and imported it into Eclipse. Also, I tried to resolve compile time errors by importing all necessary jars. Those I have downloaded from

http://www.java2s.com

Imported JARs:

android-support-v4.jar, google-api-client-1.4.1-beta.jar, google-api-client-1.12.0-beta.jar, google-api-client-android-1.15.0-rc.jar, google-api-client-extensions-android2-1.4.1-beta.jar, google-api-client-java6-1.19.1-sources.jar, google-api-services-youtube-v3-rev126-1.19.1.jar,google-http-client-1.18.0-rc.jar

But, when I run the project, I get different runtime errors such as

  1. NoClassDefFoundError for HttpTransport transport = AndroidHttp.new Compatible Transport()

  2. NoClassDefFoundError GoogleAccountCredential

  3. NoClassDefFoundError GsonFactory

I tried a lot and searched the web for answers. How can I resolve these issues?

1
@Ibrahim Ulukaya Please suggest me what actually I am missing anything - VVB
@Niranjan Deo Please suggest some points if I am missing anything - VVB

1 Answers

1
votes

This error is caused when a class is not available at run time, even though it is available at compile time.

A fix for this could be restarting Eclipse. Additionally you can try fixing through these steps:

  1. Go to "Project Properties"
  2. Next to "Java Build Path"
  3. Choose separator "Libraries"
  4. Click "Remove all Libraries"
  5. Manually add back all the libraries.