YouTube播放器停止,并显示需要一个库的错误消息。

huangapple go评论77阅读模式
英文:

youtube player stops with an error that a library is required message

问题

I wrote an application in android studio in which I use the youtubeplayer api, when I download the apk file to a xiaomi phone, the youtube player stops with an error saying that an error occurred during the initialization of the player, it gives a client library update required message.

当我在Android Studio中编写了一个应用程序,其中使用了YouTube播放器API,当我将APK文件下载到小米手机时,YouTube播放器出现错误,显示初始化播放器时发生错误,需要更新客户端库的消息。

When using android studio emulator the player works fine

在使用Android Studio模拟器时,播放器正常工作

I use android studio, Flamingo version, on PC

我在PC上使用Android Studio的Flamingo版本

it's also interesting that it worked on the phone for two days

有趣的是它在手机上工作了两天。

英文:

I wrote an application in android studio in which I use the youtubeplayer api, when I download the apk file to a xiaomi phone, the youtube player stops with an error saying that an error occurred during the initialization of the player, it gives a client library update required message.

When using android studio emulator the player works fine
I use android studio, Flamingo version, on PC
it's also interesting that it worked on the phone for two days

答案1

得分: 2

这发生的原因是因为您的手机上安装了最近更新的YouTube应用程序,这会阻止YouTube库的初始化。

我预计您正在使用已弃用的YouTube Android播放器。

作为可能的解决方案,您可以使用基于IFrame Player API的另一个播放器。

英文:

The reason of this happening is because on the phone you have a recently updated Youtube App installed and this blocks the initialization of the Youtube library.

I expecting you're using this deprecated Youtube Android player.

As a possible solution, you can use another player that is based on IFrame Player API.

答案2

得分: 1

如果Android设备更新了YouTube应用程序,那么旧的https://developers.google.com/youtube/android/player库将停止工作。我们可以使用https://developers.google.com/youtube/iframe_api_reference库进行开发,或者卸载YouTube应用程序的更新,然后尝试使用现有库,它将可以正常工作。

英文:

If an Android device updates the youtube app then the old https://developers.google.com/youtube/android/player library is stopped working. We can use https://developers.google.com/youtube/iframe_api_reference library for Development else uninstall the update of the youtube app and try it will work with the existing library.

huangapple
  • 本文由 发表于 2023年6月12日 22:07:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/76457478.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定