
exoplayer and jwplayer crash
I am using both exoplayer and jwplayer in my project.
exoplayer- to play encrypted videos
jwplayer - to play video from link
but when I am using the both libraries in build gradle I am getting the below error.
:app:transformClassesWithDexBuilderForDebug UP-TO-DATE
AGPBI: {"kind":"error","text":"Program type already present: com.google.android.exoplayer2.source.dash.BuildConfig","sources":[{}],"tool":"D8"}
:app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
:app:buildInfoGeneratorDebug
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: C:\Users\Aadhhan\Bitbucket\Hixic New\Hixic Version Mar-2018\app\build\intermediates\transforms\dexBuilder\debug\0.jar, C:\Users\Aadhhan\Bitbucket\Hixic New\Hixic Version Mar-2018\app\build\intermediates\transforms\dexBuilder\debug\1.jar, C:\Users\Aadhhan\Bitbucket\Hixic New\Hixic Version Mar-.....
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 10s
60 actionable tasks: 9 executed, 51 up-to-date
here is my app build gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.aadhan.videos"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = true
}
}
android {
lintOptions {
checkReleaseBuilds false
}
}
repositories {
mavenCentral()
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation ('com.longtailvideo.jwplayer:jwplayer-core:+'){
}
implementation ('com.longtailvideo.jwplayer:jwplayer-common:+'){
}
// Only required if using IMA features
implementation ('com.longtailvideo.jwplayer:jwplayer-ima:+'){
}
// Only required if using Chromecast jh
implementation ('com.longtailvideo.jwplayer:jwplayer-chromecast:+'){
}
implementation ('com.google.android.exoplayer:exoplayer:2.7.2'){
force = true
}
}
apply plugin: 'com.google.gms.google-services'
sorry from my poor english, this is my first post. please help me out with the solution