Exception thrown by invoked constructor in com.google.android.youtube.api.jar.client.RemoteEmbeddedPlayer

前端 未结 2 1283
离开以前
离开以前 2021-01-13 03:17

I have changed my dependencies to import com.android.support:appcompat-v7:23.0.1 and com.android.support:design:23.0.1 but it\'s not fix the error. The youtube Fragment show

相关标签:
2条回答
  • 2021-01-13 03:53

    Try using

    mYoutubePlayerFragment = YouTubePlayerSupportFragment.newInstance();
    

    instead of

    mYoutubePlayerFragment = new YouTubePlayerSupportFragment();
    
    0 讨论(0)
  • 2021-01-13 03:54

    In your build.gradle file, instead of
    compile project(':YouTubeAndroidPlayerApi')

    [replace it with] compile files('libs/YouTubeAndroidPlayerApi.jar')

    Make sure you have copied the jar file in to the libs folder.

    0 讨论(0)
提交回复
热议问题