Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot load modern controls UI. Upgrade to the latest version of the Android YouTube API

I'm trying to use Android Youtube API. Everything works ok excepts that when I extends AppCompatActivity. The UI of YoutubePlayer looks so bad. I tried both of YoutubePlayerFragment and YoutubePlayerSupportFragment. Nothing works.
The logcat is like below:

W/YouTubeAndroidPlayerAPI: Cannot load modern controls UI. Upgrade to the latest version of the Android YouTube API.

I already updated the latest youtube api 1.2.2. But It's still not working.
The weird thing is that If I extend FragmentActivity or Activity, It works.
Please helps. Thanks in advance.

like image 649
Huy Duong Tu Avatar asked Jan 22 '26 15:01

Huy Duong Tu


1 Answers

For me the issue is that I am able to play the video only once but after that YouTubePlayer doesn't play any video and I hope there are many other people who are also facing similar issues with the YouTubeAndroidPlayerAPI. I think the latest youtube app (version 10.37.58) and YouTubeAndroidPlayerAPI 1.2.1 are not compatible.

To best of my knowledge the only thing you can do currently to solve this problem is downgrade your youtube app installed on the device to 10.36.52 or below. (you can get it from apk mirror)

From what I have noticed while working with YouTubeAndroidPlayerAPI is that with the youtube version 10.36.52 it throws warning messages "Cannot load modern controls UI. Upgrade to the latest version of the Android YouTube API." on the logcat everytime I try to play a video but otherwise works fine. And with version 10.35.53 and below no such warning message is thrown.

Reason: I am not sure but I think this has something to do with the huge memory leak issue with the YoutubePlayerSupport fragment in YouTubeAndroidPlayerAPI 1.2.1 which was widely known and reported in google data api issue tracker. It was finally fixed last month on 1st September (at least that's what the current status says) after a year since it was reported (surprised to see what took google so long). However google hasn't rolled out the new version of YouTubeAndroidPlayerAPI with the fix yet. So maybe they fixed that memory issue in the youtube app in September which some how broke the functionality of YouTubeAndroidPlayerAPI 1.2.1 in some way (since YouTubeAndroidPlayerAPI directly depends on the youtube app to work).

like image 82
Brendan Henry Avatar answered Jan 24 '26 18:01

Brendan Henry



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!