Android之解决YouTubePlayerView启动在Android5.0左右的手机出现奔溃问题

聂炜
2023-12-01

1 问题

用YouTubePlayerView(https://github.com/PierfrancescoSoffritti/android-youtube-player)在部分Android5.0手机上初始化的时候出现手机奔溃,错误提示如下

关键日志如下:

Error inflating class com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView

 全部日志错误

roidRuntime(22826): android.view.InflateException: Binary XML file line #19: Error inflating class com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView
E/AndroidRuntime(22826):        at android.view.LayoutInflater.createView(LayoutInflater.java:633)
E/AndroidRuntime(22826):        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
E/AndroidRuntime(22826):        at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
E/AndroidRuntime(22826):        at android.view.LayoutInflater.rInflate(LayoutInflater.java
 类似资料: