PierfrancescoSoffritti / android-youtube-player

YouTube Player library for Android and Chromecast, stable and customizable.
https://pierfrancescosoffritti.github.io/android-youtube-player/
MIT License
3.44k stars 765 forks source link

Method does not override method from its superclass #1098

Closed muzzammilalam2 closed 10 months ago

muzzammilalam2 commented 10 months ago

I am getting this error "Method does not override method from its superclass" please suggest a solution. Thanks

` import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.listeners.AbstractYouTubePlayerListener;

youTubePlayerView.addYouTubePlayerListener(new AbstractYouTubePlayerListener() { @Override public void onReady(@NonNull YouTubePlayer youTubePlayer) { // Set your dynamic video ID here String dynamicVideoId = "YOUR_DYNAMIC_VIDEO_ID";

                        // Load the video
                        youTubePlayer.loadVideo(dynamicVideoId, 0);

                        // Optionally, you can also set other parameters like autoPlay
                        youTubePlayer.play();
                    }
                });`
PierfrancescoSoffritti commented 10 months ago

The syntax of your code looks wrong. This is a java "problem", not related to the library.