gpt4 book ai didi

android - 使用 YoutubePlayer.loadVideo 时出现异常

转载 作者:行者123 更新时间:2023-11-29 02:22:57 24 4
gpt4 key购买 nike

调用 YoutubePlayer.loadVideo() 方法时出现异常。

以下是我使用的代码:

  onInitializedListener=new YouTubePlayer.OnInitializedListener()
{
@Override
public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult result) {
Log.d("onInitializationFailure","Unable to load");
}

@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer player, boolean wasRestored) {
//player.loadVideo(strVideoURL);
player.cueVideo(strVideoURL,1);
}
};

以下是我在 androidstudio 中遇到的异常(由于此异常,它只显示黑屏,之后我也无法调用任何其他视频):

01-08 23:00:11.868 32736-3385/? E/YouTubeAndroidPlayerAPI: Failed to construct CronetEngine. Using fallback Java implementation.
java.lang.IllegalStateException: Disk cache storage path already in use
at org.chromium.net.impl.CronetUrlRequestContext.<init>(SourceFile:49)
at awpo.a(SourceFile:5)
at awkn.a(SourceFile:18)
at vot.a(SourceFile:24)
at vov.get(SourceFile:16)
at autw.get(SourceFile:9)
at lfx.M(SourceFile:140)
at lfh.get(SourceFile:4)
at vrf.c(SourceFile:78)
at vrf.run(SourceFile:27)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at vgy.run(SourceFile:12)
at java.lang.Thread.run(Thread.java:764)

最佳答案

我最近观察到,当我在 Activity 之间导航时,我得到的是空“strVideoURL”。这就是我们出现黑屏的原因。

在这里分享,因为它可能有助于找出他们的错误。

谢谢

关于android - 使用 YoutubePlayer.loadVideo 时出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54097049/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com