Exception Details java.lang.IllegalStateException: No VideoCastManager instance was found, did you forget to initialize it?
    at com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager.getInstance(VideoCastManager.java:264)
    at com.google.android.libraries.cast.companionlibrary.widgets.MiniController.<init>(MiniController.java:111)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835)
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:394)

我要把这个放在布局里。知道我怎么解决这个问题吗?

最佳答案

您需要将应用程序添加到应用程序中,在应用程序的oncreate()中初始化videocastmanager,并记住将应用程序名称添加到清单中;所有这些都在文档中列出。

关于android - 在LocalPlayerActivity chromecast中遇到问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33624142/

10-09 09:26