2

I work on an app with multiple Dynamic Modules.

In order to add the video download's feature to my app, I need to add the ExoPlayer UI dependency (com.google.android.exoplayer:exoplayer-ui:2.11.1) to my base module. Since I already have this dependency in my player module, I have this compilation error message :

Modules 'base' and 'player' contain entry 'res/layout/exo_playback_control_view.xml' with different content.

Since I can't rename the ExoPlayer generated layout file, I've tried to get ride of this file from my base module since I only need it into my player module.

So far I've tried :

sourceSets {
        main.res.srcDirs += 'src/main/res'

        main {
            res {
                exclude 'res/layout/exo_playback_control_view.xml'
                exclude 'layout/exo_playback_control_view.xml'
                exclude 'exo_playback_control_view.xml'
                exclude 'library/ui/src/main/res/layout/exo_playback_control_view.xml'
            }
        }
    }

And

packagingOptions {
        exclude 'res/layout/exo_playback_control_view.xml'
        exclude 'layout/exo_playback_control_view.xml'
        exclude 'exo_playback_control_view.xml'
        exclude 'library/ui/src/main/res/layout/exo_playback_control_view.xml'
    }

Any of these works. I am not comfortable with Gradle as you probably can see.

I've also opened an issue on the ExoPlayer Github repository.

Does anyone have another idea to avoid this compilation error?

Ali
  • 3,346
  • 4
  • 21
  • 56
Florang
  • 218
  • 2
  • 11

0 Answers0