Hello Kodular Team,
I am developing a custom Kodular extension based on AndroidX Media3 (version 1.7.1) for IPTV/HLS playback.
After a long debugging process, I have reached an interesting point and would like to know whether this is a known Companion limitation or if there is a recommended workaround.
Current Status
My extension successfully builds and works inside a compiled APK.
The following code executes successfully:
ExoPlayer player = new ExoPlayer.Builder(context).build();
The extension returns “EXO OK” and does not crash.
Libraries Included
- media3-common 1.7.1
- media3-exoplayer 1.7.1
- media3-decoder 1.7.1
- media3-extractor 1.7.1
- media3-datasource 1.7.1
- guava-33.2.1-android
Problem
The exact same extension fails when loaded through Makeroid Companion.
Runtime error:
java.lang.NoClassDefFoundError / NoSuchMethodError
ImmutableMap.Builder.buildOrThrow()
Investigation Performed
To understand the issue, I extracted the Companion APK from an Android emulator and inspected its dex files.
I found:
com/google/common/collect/ImmutableMap$Builder
exists inside Companion.
However:
buildOrThrow
does NOT exist anywhere in the Companion dex files.
This suggests that Companion bundles an older Guava version, while Media3 1.7.1 expects a newer Guava implementation that includes:
ImmutableMap.Builder.buildOrThrow()
Question
- Is Companion known to bundle an older Guava version?
- Is there a documented limitation when using newer AndroidX Media3 libraries inside Companion?
- Has anyone successfully used Media3 1.7.x in a Kodular extension while still maintaining Companion compatibility?
- Is there a recommended way to isolate or relocate Guava dependencies for custom extensions?
Additional Notes
- APK build works correctly.
- Only Companion fails.
- The issue appears to be a dependency conflict rather than a Media3 API problem.
- I have already confirmed that all required Media3 dependencies are present.
Any advice from the Kodular team or developers who have worked with modern AndroidX / Media3 libraries would be greatly appreciated.
Thank you.