Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate files during packaging of APK #24

Closed
iainconnor opened this issue Nov 17, 2015 · 14 comments
Closed

Duplicate files during packaging of APK #24

iainconnor opened this issue Nov 17, 2015 · 14 comments

Comments

@iainconnor
Copy link

With latest 1.3.0;

Error:duplicate files during packaging of APK /Users/admin/Documents/Android/chillmo/app/build/outputs/apk/app-debugLive-unaligned.apk
    Path in archive: lib/armeabi-v7a/libblasV8.so
    Origin 1: /Users/admin/Documents/Android/chillmo/app/build/intermediates/exploded-aar/jp.wasabeef/glide-transformations/1.3.0/jni/armeabi-v7a/libblasV8.so
    Origin 2: /usr/local/Cellar/android-sdk/24.3.3/build-tools/23.0.2/renderscript/lib/packaged/armeabi-v7a/libblasV8.so
You can ignore those files in your build.gradle:
    android {
      packagingOptions {
        exclude 'lib/armeabi-v7a/libblasV8.so'
      }
    }
Error:Execution failed for task ':app:packageDebugLive'.
> Duplicate files copied in APK lib/armeabi-v7a/libblasV8.so
    File 1: /Users/admin/Documents/Android/chillmo/app/build/intermediates/exploded-aar/jp.wasabeef/glide-transformations/1.3.0/jni/armeabi-v7a/libblasV8.so
    File 2: /usr/local/Cellar/android-sdk/24.3.3/build-tools/23.0.2/renderscript/lib/packaged/armeabi-v7a/libblasV8.so
@ghost
Copy link

ghost commented Nov 19, 2015

I fixed it removing this:

android {
    ...
    defaultConfig {
        ...
        renderscriptTargetApi 23
        renderscriptSupportModeEnabled true
    }
}

@KishoreBabuIN
Copy link

Removing
renderscriptTargetApi 23
renderscriptSupportModeEnabled true
doesnt help... i get a white background if i remove them. the issue is really annoying.

@question-bot
Copy link

I wanted to use BlurTransformation, so I added a below configurations.

android {
    ...
    defaultConfig {
        ...
        renderscriptTargetApi 23
        renderscriptSupportModeEnabled true
    }
}

As a result, I also had a same error with 1.3.0 version on Nexus 5(Android 6.0).
So, I am using 1.2.1 version instead of 1.3.0, and it works well.

@MarsVard
Copy link

has anybody found a good solution for this? removing renderScript support isn't a good solution as you can't use the blurtransformation anymore...

@alfdev
Copy link

alfdev commented Dec 2, 2015

i'm using 1.3.1 version and still persists the issue, only with renderscriptSupportMode Enabled set to false it works but not for all android versions.

@wasabeef
Copy link
Owner

wasabeef commented Dec 2, 2015

Could you the code in the git repos?

@alfdev
Copy link

alfdev commented Dec 2, 2015

Sorry wasabeef i don't understand you.

@wasabeef
Copy link
Owner

wasabeef commented Dec 2, 2015

@alfdev

Could you show me the source code in the zip or git? :shipit:

@alfdev
Copy link

alfdev commented Dec 2, 2015

I can'l show all the code but this is some parts from gradle:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.test"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"

        renderscriptTargetApi 23
        renderscriptSupportModeEnabled true
    }
...

And the java snipped that i use to download an image, mask and blur it is:

Glide.with(getActivity())
                        .load(imageUrl)
                        .bitmapTransform(
                                centerCropTransform.get(),
                                maskFirstTransform.get(),
                                new BlurTransformation(getActivity(), 25, 1)
                        )
                        .diskCacheStrategy(DiskCacheStrategy.RESULT)
                        .into(imageView);

@wasabeef
Copy link
Owner

wasabeef commented Dec 3, 2015

@iainconnor @IGZangelsanchez @barykaed @soaple @MarsVard @alfdev

What is the version of Android Plugin for Gradle?
Please be on 1.5.0 or later.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

@alfdev
Copy link

alfdev commented Dec 3, 2015

I'm on 1.3.1 version, as soon as possbile i try the 1.5.0 version and let know you the results.

Thanks

@wasabeef
Copy link
Owner

wasabeef commented Dec 3, 2015

@alfdev

Good 👍

@alfdev
Copy link

alfdev commented Dec 3, 2015

Wow, now seems to work correctly...thank you wasabeef

Great Work

@bluemix
Copy link

bluemix commented Aug 17, 2016

Hello,
I enabled Jack,

    defaultConfig {
        ...
        jackOptions {
            enabled true
        }

having buildToolsVersion "24.0.1"
and grade:2.1.2

and get the following

 Error:Execution failed for task ':app:transformNative_libsWithMergeJniLibsForRelease'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK lib/armeabi-v7a/libblasV8.so
    File1: /Users/bluemix/Downloads/Flow_Launcher/app/build/intermediates/exploded-aar/jp.wasabeef/picasso-transformations/1.3.1/jni
    File2: /Users/bluemix/Downloads/Flow_Launcher/app/build/intermediates/exploded-aar/jp.wasabeef/fresco-processors/1.1.1/jni

PS: even if i disabled Jack, I still get this error with buildToolsVersion "24.0.1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants