ERROR: Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16
declared in library [cn.jzvd:jiaozivideoplayer:6.2.9]
要求sdk最小版本为16
解决:
defaultConfig {
applicationId "com.example.day16_video"
minSdkVersion 16 // 修改处
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
1.依赖
implementation 'cn.jzvd:jiaozivideoplayer:6.2.9'
<cn.jzvd.JZVideoPlayerStandard
android:id="@+id/videoplayer"
android:layout_width="match_parent"
android:layout_height="200dp" />
2.简单使用
public void jiaoziPlayer(){
String mp4path = Environment.getExternalStorageDirectory() + File.separator + "xxx.mp4";
JZVideoPlayerStandard jzVideoPlayerStandard = (JZVideoPlayerStandard) findViewById(R.id.videoplayer);
jzVideoPlayerStandard.setUp(mp4path
, JZVideoPlayerStandard.SCREEN_WINDOW_NORMAL, "饺子闭眼睛");
jzVideoPlayerStandard.thumbImageView.setImageResource(R.drawable.ic_launcher_background);
}