cameraview-ex icon indicating copy to clipboard operation
cameraview-ex copied to clipboard

More than one file was found with OS independent path 'META-INF/atomicfu.kotlin_module'

Open deshant opened this issue 5 years ago • 0 comments

Want to raise 2 points:

First is that the callbacks of the library are using kotlin and prefer lambda expressions. The code is not designed to work well with java 7. For example: camera.addCameraOpenedListener() Please mention this in prerequisite to use this library, or provide support/guide for using it along with Java 7.

Second, After adding library dependency, got error during build: More than one file was found with OS independent path 'META-INF/atomicfu.kotlin_module'

Expected behavior Build should work without causing conflicts.

Using ProGuard

  • without ProGuard

Device (please complete the following information):

  • Device: NA
  • OS: NA
  • API: 29
  • App version 3.5.5-alpha minSdkVersion 21 targetSdkVersion 29 compileSdkVersion 29 gradle 3.5.3 using Java 7

To fix this, had to add following in app level gradle:

packagingOptions {
        pickFirst  'META-INF/*'
}

Any reason why this is happening?

My dependencies:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    // request permission
    implementation 'com.karumi:dexter:6.0.1'

    // CameraViewEx
    // https://github.com/pvasa/cameraview-ex?utm_source=android-arsenal.com&utm_medium=referral&utm_campaign=7320
    implementation "com.priyankvasa.android:cameraview-ex:3.5.5-alpha"

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

deshant avatar Feb 11 '20 12:02 deshant