sannies / mp4parser

A Java API to read, write and create MP4 files
Apache License 2.0
2.76k stars 566 forks source link

Program type already present: com.coremedia.iso.AbstractBoxParser #305

Open ritesh94 opened 6 years ago

ritesh94 commented 6 years ago

Program type already present: com.coremedia.iso.AbstractBoxParser$1 Message{kind=ERROR, text=Program type already present: com.coremedia.iso.AbstractBoxParser$1, sources=[Unknown source file], tool name=Optional.of(D8)}

Gradle dependencies:

dependencies {

    final SUPPORT_LIBRARY_VERSION = '27.1.1'
    final FIREBASE_VERSION = '12.0.0'
    final CRASHLYTICS = '2.9.0'
    final OKHTTP__VERSION = '3.9.1'
    final RETROFIT_VERSION = '2.3.0'
    final GSON_VERSION = '2.8.2'
    final CAMERAVIEW_VERSION = '1.5.0'
    final CIRCLE_IMAGE_VIEW_VERSION = '2.2.0'
    final IMAGE_CROP_VERSION = '2.2.1'

    final APACHE_COMMONS_VERSION = '1.2'

    final BUTTERKNIFE_VERSION = '8.8.1'
    final GLIDE_VERSION = '4.6.1'
    final MULTIDEX_VERSION = '1.0.3'
    final COUNTRY_CODE_PICKER_VERSION = '2.1.4'
    final VIDEO_LIST_PLAYER_VERSION = '1.4'
    final SILI_COMPRESSOR_VERSION = '2.1'

    final JUNIT_VERSION = '4.12'
    final RUNNER_VERSION = '1.0.1'
    final ESPRESSO_VERSION = '3.0.1'

    ext {
        versions = [
                'ffmpeg': '3.4.1-1.4'
        ]
    }

    implementation fileTree(dir: 'libs', include: ['*.jar'])

    // Support dependencies
    implementation "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
    implementation "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
    implementation "com.android.support:animated-vector-drawable:$SUPPORT_LIBRARY_VERSION"
    implementation "com.android.support:exifinterface:$SUPPORT_LIBRARY_VERSION"
    implementation "com.android.support:cardview-v7:$SUPPORT_LIBRARY_VERSION"
    implementation "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION"
    implementation "com.android.support:design:$SUPPORT_LIBRARY_VERSION"

    // Firebase & Crashalytics
    implementation "com.google.firebase:firebase-auth:$FIREBASE_VERSION"
    implementation "com.google.firebase:firebase-messaging:$FIREBASE_VERSION"
    implementation "com.google.firebase:firebase-core:$FIREBASE_VERSION"
    implementation("com.crashlytics.sdk.android:crashlytics:$CRASHLYTICS@aar") {
        transitive = true;
    }

    // Retrofit and OkHttp networking libraries
    implementation "com.squareup.okhttp3:okhttp:$OKHTTP__VERSION"
    implementation "com.squareup.okhttp3:logging-interceptor:$OKHTTP__VERSION"
    implementation "com.squareup.retrofit2:retrofit:$RETROFIT_VERSION"
    implementation "com.squareup.retrofit2:converter-gson:$RETROFIT_VERSION"
    implementation "com.google.code.gson:gson:$GSON_VERSION"

    // Camera, circleImageView and imageCrop
    implementation "com.otaliastudios:cameraview:$CAMERAVIEW_VERSION"
    implementation "de.hdodenhof:circleimageview:$CIRCLE_IMAGE_VIEW_VERSION"
    implementation "com.github.yalantis:ucrop:$IMAGE_CROP_VERSION-native"
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'

    implementation group: 'org.apache.commons', name: 'commons-text', version: "$APACHE_COMMONS_VERSION"

    // Butterknife
    implementation "com.jakewharton:butterknife:$BUTTERKNIFE_VERSION"

    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    annotationProcessor "com.jakewharton:butterknife-compiler:$BUTTERKNIFE_VERSION"

    // Glide - imageLoading
    implementation "com.github.bumptech.glide:glide:$GLIDE_VERSION"
    annotationProcessor "com.github.bumptech.glide:compiler:$GLIDE_VERSION"

    // multidex
    implementation "com.android.support:multidex:$MULTIDEX_VERSION"

    // ContryCode picker
    implementation "com.hbb20:ccp:$COUNTRY_CODE_PICKER_VERSION"

    // Sili Image/Video compressor
    implementation "com.iceteck.silicompressorr:silicompressor:$SILI_COMPRESSOR_VERSION"

    // Video player in recyclerview
    implementation "com.github.waynell:VideoListPlayer:$VIDEO_LIST_PLAYER_VERSION"

    implementation "im.ene.toro3:toro:3.4.2"
    implementation "im.ene.toro3:toro-ext-exoplayer:3.4.2"

    // Local Unit tests
    testImplementation "junit:junit:$JUNIT_VERSION"

    // JavaCV
    implementation group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: versions.ffmpeg
    implementation group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: versions.ffmpeg, classifier: 'android-arm'
    implementation files('libs/javacv-1.4.2.jar')

    implementation 'com.googlecode.mp4parser:isoparser:1.1.20'

    // Espresso Unit testing
    androidTestImplementation "com.android.support.test:runner:$RUNNER_VERSION"
    androidTestImplementation "com.android.support.test.espresso:espresso-core:$ESPRESSO_VERSION", {
        exclude group: 'com.android.support', module: 'support-annotations'
    }
}
mahendramahi commented 6 years ago

Hi , i m also in same problem, any one who able to fix this issue .

in first of i didn't get this issue but when i use com.googlecode.isoparser and com.googlecode.libphonenumber then i got this error.

Please help me out

mahendramahi commented 6 years ago

apply plugin: 'com.android.application' apply plugin: 'com.jakewharton.butterknife'

android {

compileSdkVersion 27
defaultConfig {
    applicationId "com.package name"
    minSdkVersion 19
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
    //enabled for vector drawable
    vectorDrawables.useSupportLibrary = true
}
packagingOptions {
    exclude 'isoparser-default.properties'
    exclude 'builddef.lst'
    exclude 'version.txt'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'

}

buildTypes {
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

// debug { // debuggable true // minifyEnabled true // shrinkResources true // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' // } } buildTypes.each { it.buildConfigField 'String', 'SECRET_KEY_AES', MySecretKey } dataBinding { enabled = true } compileOptions { targetCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8 } // buildToolsVersion '27.0.3' } buildscript { repositories { jcenter() maven { url 'https://maven.google.com' } } }

allprojects { repositories { jcenter() maven { url "https://jitpack.io" } } }

dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion" implementation "com.android.support:support-v4:$rootProject.supportLibraryVersion" implementation "com.android.support:design:$rootProject.supportLibraryVersion" implementation "com.android.support:support-vector-drawable:$rootProject.supportLibraryVersion" implementation "com.android.support:design:$rootProject.supportLibraryVersion" implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' implementation 'com.android.support:multidex:1.0.3'

//cardview
implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"

// view model
implementation "android.arch.lifecycle:extensions:$rootProject.lifecycle"
annotationProcessor "android.arch.lifecycle:compiler:$rootProject.lifecycle"

// reactive
implementation "io.reactivex.rxjava2:rxjava:$rootProject.rxjava2Version"
implementation "io.reactivex.rxjava2:rxandroid:$rootProject.rxandroidVersion"

// dependency injection
implementation "com.google.dagger:dagger:$rootProject.dagger2Version"
annotationProcessor "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"
annotationProcessor "com.google.dagger:dagger-android-processor:$rootProject.dagger2Version"
implementation "com.google.dagger:dagger-android-support:$rootProject.dagger2Version"
implementation "com.squareup.retrofit2:retrofit:$rootProject.retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$rootProject.retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$rootProject.retrofitVersion"
implementation "com.squareup.okhttp3:okhttp:$rootProject.okhttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$rootProject.okhttpVersion"
implementation 'at.blogc:expandabletextview:1.0.3'

// compile 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:2.3.0-beta1'

//video player
implementation "com.google.android.exoplayer:exoplayer:${rootProject.ext.exoPlayer2Version}"
implementation 'im.ene.toro3:toro:3.4.2'
implementation 'im.ene.toro3:toro-ext-exoplayer:3.4.2'

//Show character as image
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'

//location
implementation 'com.google.android.gms:play-services-location:11.8.0'

//permission lib
implementation 'com.karumi:dexter:4.2.0'

//Image loading
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'me.itangqi.waveloadingview:library:0.3.5'
implementation 'at.blogc:expandabletextview:1.0.3'

//Phone number valid
implementation 'com.googlecode.libphonenumber:libphonenumber:8.2.0'
implementation 'com.wang.avi:library:2.1.3'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.7'
implementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT'

//video compression
implementation 'com.yovenny.VideoCompress:videocompress:1.0.0'

//trasition
implementation 'com.andkulikov:transitionseverywhere:1.7.6'

//tranloadit (file uploader)
implementation 'com.transloadit.android.sdk:transloadit-android:0.0.2'

// for url preview
implementation 'org.jsoup:jsoup:1.8.3'

// required
implementation 'com.leocardz:link-preview:2.0.0@aar'

///for video croping gradle (iso parser using Mp4 parser)

//implementation 'com.googlecode.mp4parser:isoparser:1.1.22'
compile('com.googlecode.mp4parser:isoparser:1.1.20') {
    exclude group: 'com.android.support', module: 'support-v4'
}
implementation project(':discoverlib')
implementation project(':hramodule')
implementation project(':store')
implementation project(':dailylog')
implementation project(':remindermodule')
implementation project(':stepmodule')

// implementation project(':libphonenumber')

}

Please help me .... i m getting program already present after using mp4parsing

thealpha commented 6 years ago

did you solved this...bro I also getting same problem

mahendramahi commented 6 years ago

yes i resolved this there was a silly mistake .... different version of same library and using by third party gradle.

WasifIbrahim29 commented 5 years ago

yes i resolved this there was a silly mistake .... different version of same library and using by third party gradle.

How did you resolve this bro? please let me knowww

mahendramahi commented 5 years ago

Just check your applied third party gradles that they are using same lib or gradle with diffrent version.

rishabhjain-engineer commented 5 years ago

How to check for third party lib, which are using same lib but different version. Error i am facing while integrating Silli Compressor: "Program type already present: com.coremedia.iso.BoxParser". If you could help me out.

balavickey1192 commented 5 years ago

Have you found out the problem?

HBiSoft commented 4 years ago

This issue is self-explanatory, there is another library using com.coremedia.iso or isoparser.

Find the library which is using it, you can do that using gradlew app:dependencies, it will probably be some video library. Then add the following to that library (inside you build.gradle)

implementation('some_library_using_isoparser') {
    exclude  group: 'org.mp4parser', module: 'isoparser'
}

This should solve your problem, please close the issue if it does.