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

2.x: Duplicated file rxjava.properties #4445

Closed
adipascu opened this Issue Aug 30, 2016 · 10 comments

Comments

Projects
None yet
10 participants
@adipascu
Contributor

adipascu commented Aug 30, 2016

META-INF/rxjava.properties can be found in both 2.0.0-RC1 and 1.1.8. This causes a build error under android if I include both versions of RxJava without excluding the file.

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/rxjava.properties
    File1: /home/adi/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.1.8/f9dbae366a6a3d6b5041c5e8db0dcdfdc35c27b5/rxjava-1.1.8.jar
    File2: /home/adi/.gradle/caches/modules-2/files-2.1/io.reactivex.rxjava2/rxjava/2.0.0-RC1/3ee37bb825446a3bafac68a46f2397a8affd9b68/rxjava-2.0.0-RC1.jar
@JakeWharton

This comment has been minimized.

Show comment
Hide comment
@JakeWharton

JakeWharton Aug 30, 2016

Member

This isn't used at runtime so an exclude is fine.

Member

JakeWharton commented Aug 30, 2016

This isn't used at runtime so an exclude is fine.

@akarnokd akarnokd added the Question label Aug 31, 2016

@gengjiawen

This comment has been minimized.

Show comment
Hide comment
@gengjiawen

gengjiawen Sep 6, 2016

Contributor

You can exclude it using packageOptions

Contributor

gengjiawen commented Sep 6, 2016

You can exclude it using packageOptions

@akarnokd

This comment has been minimized.

Show comment
Hide comment
@akarnokd

akarnokd Sep 14, 2016

Member

I'm closing this issue due to inactivity. If you have further input on the issue, don't hesitate to reopen this issue or post a new one.

Member

akarnokd commented Sep 14, 2016

I'm closing this issue due to inactivity. If you have further input on the issue, don't hesitate to reopen this issue or post a new one.

@worstkiller

This comment has been minimized.

Show comment
Hide comment
@worstkiller

worstkiller Nov 4, 2016

since its closed, but still once can exclude this as mentioned by gengjiawen
packagingOptions {
exclude 'META-INF/rxjava.properties'
}

since its closed, but still once can exclude this as mentioned by gengjiawen
packagingOptions {
exclude 'META-INF/rxjava.properties'
}

@DavidMihola

This comment has been minimized.

Show comment
Hide comment
@DavidMihola

DavidMihola Apr 27, 2017

For people like me who didn't know where to put the packagingOptions...

For Android projects put it in your app/build.gradle at:

android {
    ...
    packagingOptions {
        exclude 'META-INF/rxjava.properties'
    }
}

For people like me who didn't know where to put the packagingOptions...

For Android projects put it in your app/build.gradle at:

android {
    ...
    packagingOptions {
        exclude 'META-INF/rxjava.properties'
    }
}
@ddwhan0123

This comment has been minimized.

Show comment
Hide comment
@ddwhan0123

ddwhan0123 Jun 11, 2017

Thanks for every one

Thanks for every one

@ParvinderMaan

This comment has been minimized.

Show comment
Hide comment

thanks all

@skpaik

This comment has been minimized.

Show comment
Hide comment
@skpaik

skpaik Jan 17, 2018

Use the following code block

android {
    packagingOptions {
        pickFirst 'protobuf.meta'
        }
}

skpaik commented Jan 17, 2018

Use the following code block

android {
    packagingOptions {
        pickFirst 'protobuf.meta'
        }
}
@JakeWharton

This comment has been minimized.

Show comment
Hide comment
@JakeWharton

JakeWharton Jan 17, 2018

Member
Member

JakeWharton commented Jan 17, 2018

amardeshbd added a commit to amardeshbd/android-daily-headlines that referenced this issue Feb 24, 2018

[ADDED] [#206] MultiDex support as it exceeded 65K limit after adding…
… store library.

Fixrd issue with packaging based on option ReactiveX/RxJava#4445
Refactored functions to get sha and build time.
@StevenWT

This comment has been minimized.

Show comment
Hide comment

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment