问题描述
我的 Android 应用程序在使用适用于 Android 的 Brightcove Native SDK 时崩溃。 Android Studio 日志显示-
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/exoplayer2/drm/DefaultDrmSessionEventListener;
活动类-
public class SetActivity extends BrightcovePlayer {
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_set);
BrightcoveExoPlayerVideoView brightcoveVideoView = (BrightcoveExoPlayerVideoView) findViewById(R.id.brightcove_video_view);
super.onCreate(savedInstanceState);
// Define a video from a Remote Server
Video video = Video.createVideo("https://learning-services-media.brightcove.com/videos/hls/greatblueheron/greatblueheron.m3u8",DeliveryType.HLS);
// Load a remote poster image
try {
java.net.URI myposterImage = new java.net.URI("https://solutions.brightcove.com/bcls/assets/images/Great-Blue-heron.png");
video.getProperties().put(Video.Fields.STILL_IMAGE_URI,myposterImage);
} catch (URISyntaxException e) {
e.printstacktrace();
}
// Add video to the view
brightcoveVideoView.add(video);
// Start video playback
brightcoveVideoView.start();
}
}
XML
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".general_activities.SetActivity">
<com.brightcove.player.view.BrightcoveExoPlayerVideoView
android:id="@+id/brightcove_video_view"
android:layout_width="match_parent"
android:layout_height="280dp"
/>
</RelativeLayout>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)