Question

I am trying to use YouTubeData API in my android app. (My app need to show the youtube vedio in a part of the screen, then below other widgets). I tried to follow the Google IO 2012 training session on New Youtube Android Player Tools but I failed the following errors occured.

YouTube.initialize(this, DeveloperKey)

The 'YouTube" class is not available in my app, I have already added the library 'YouTubeAndroidPlayerApi.jar' to my lib folder. Does the YouTube class is depricted? I searched it in the google api reference but I cant find any trace of it.

My bad luck is when I tried to run the sample program provided by the google YouTubeAndroidApiDemo it return Class not found exception !!

here is the logcat enter image description here

Do I have any solution? I want to implement youtube in native api, I have already done this using webview and embedded vedio link.

Thanks in advance. :)

Was it helpful?

Solution

I just had the same problem and fixed it. Go to Java Build Path/Order and Export. Check Android Private Libraries. Click OK. Clean and build the project. This should fix the error.

This issue is related with ADT 22. After its install this error occurred. Read more here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top