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 class com.facebook.soloader.Api18TraceUtils found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0) #2377

Closed
alphater opened this issue Jul 17, 2019 · 7 comments
Labels
needs-details This issue or PR is currently not actionable as it misses details (e.g. for reproducing the problem) stale

Comments

@alphater
Copy link

alphater commented Jul 17, 2019

Description

When I introduce fresco, I am compiling Androidstudio, and I am prompted with an exception, as follows:

Duplicate class com.facebook.soloader.Api18TraceUtils found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ApkSoSource found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ApkSoSource$ApkUnpacker found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.DirectorySoSource found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.DoNotOptimize found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.Elf32_Dyn found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.Elf32_Ehdr found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.Elf32_Phdr found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.Elf32_Shdr found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.Elf64_Dyn found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.Elf64_Ehdr found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.Elf64_Phdr found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.Elf64_Shdr found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExoSoSource found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExoSoSource$1 found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExoSoSource$ExoUnpacker found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExoSoSource$ExoUnpacker$FileBackedInputDsoIterator found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExoSoSource$FileDso found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExtractFromZipSoSource found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExtractFromZipSoSource$1 found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExtractFromZipSoSource$ZipDso found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExtractFromZipSoSource$ZipUnpacker found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.ExtractFromZipSoSource$ZipUnpacker$ZipBackedInputDsoIterator found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.FileLocker found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.MergedSoMapping found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.MinElf found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.MinElf$ElfError found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.NativeLibrary found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.NoopSoSource found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.SoFileLoader found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.SoLoader found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.SoLoader$1 found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.SoLoader$Api14Utils found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.SoLoader$WrongAbiError found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.SoSource found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.SysUtil found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.SysUtil$LollipopSysdeps found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.SystemLoadLibraryWrapper found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.UnpackingSoSource found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.UnpackingSoSource$1 found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.UnpackingSoSource$Dso found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.UnpackingSoSource$DsoManifest found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.UnpackingSoSource$InputDso found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.UnpackingSoSource$InputDsoIterator found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)
Duplicate class com.facebook.soloader.UnpackingSoSource$Unpacker found in modules classes.jar (com.facebook.conceal:conceal:2.0.1) and classes.jar (com.facebook.soloader:soloader:0.6.0)

Reproduction

Also introduced in my project is facebook conceal 2.0.1aar

Solution

It feels like both conceal and fresco have introduced soloader at the same time causing conflicts?

Additional Information

  • Fresco version: fresco 2.0.0
  • Platform version: all
@oprisnik
Copy link
Contributor

You have to exclude the library for one of them, something like this:

    implementation("com.facebook.fresco:fresco:2.0.0") {
        exclude group: 'com.facebook.soloader'
    }

Or for the conceal dependency.

@oprisnik oprisnik added the needs-details This issue or PR is currently not actionable as it misses details (e.g. for reproducing the problem) label Jul 17, 2019
@alphater
Copy link
Author

This program is invalid, I have tried this program initially, see the attached screenshot.
My current solution is to temporarily remove the reference to conceal and compile normally, but you can't try conceal again.
20190718084505

@psycholic4
Copy link

psycholic4 commented Jul 23, 2019

Conceal includes soloader with sourceSet. (not with gradle dependencies)
So excluding soloader in conceal dependency doens't work.
If you exclude soloader in fresco dependency, maybe it will work.
(You should exclude soloader in all fresco dependency which contains soloader not only com.facebook.fresco:fresco)
But version of soloader inside conceal is old, so app will crash on Android P.

@stale
Copy link

stale bot commented Aug 1, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug" or "enhancement" and I will leave it open. Thank you for your contributions.

@stale stale bot added the stale label Aug 1, 2019
@stale
Copy link

stale bot commented Aug 8, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to reopen with up-to-date information.

@stale stale bot closed this as completed Aug 8, 2019
@alphater
Copy link
Author

alphater commented Aug 8, 2019

隐藏包括soloadersourceSet。(不是与gradle依赖关系)
所以排除soloader隐藏依赖不起作用。
如果你soloader在壁画依赖中排除,也许它会起作用。
(你应该排除soloader所有soloader不仅包含壁画的依赖com.facebook.fresco:fresco
但是soloader内部隐藏的版本是旧的,所以应用程序将在Android P上崩溃

Thank you, I will try this method!

@ulises-castro
Copy link

Hi, I was facing the same issue, after spending one hour surfing on the web trying to get solved I did it, here my solution:

Context: Migrating and old application (3 years, RN v0.60.1) with deprecated plugins (I used upgrade helper).
React Native Version: 0.64.2
React: 17.0.1

app/build.gradle

   debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
        exclude group:'com.facebook.soloader'
        exclude group: 'com.parse.bolts'
    }

    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.flipper'
        exclude group:'com.facebook.fbjni'  
        exclude group:'com.squareup.okhttp3', module:'okhttp'
        
    }
    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
        exclude group:'com.facebook.fbjni'
        exclude group:'com.facebook.flipper'
        exclude group:'com.facebook.fresco'
        exclude group: 'com.parse.bolts'
    }

I hope, that could you help you and save time, regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-details This issue or PR is currently not actionable as it misses details (e.g. for reproducing the problem) stale
Projects
None yet
Development

No branches or pull requests

4 participants