I have implemented one dynamic feature module(It is instant-install conditional based download module) in our application in which dynamic feature module required to set the MIN_SDK version is 28 but our base module is compiled with MIN_SDK version 21.
Everything is working fine like project is compiled successfully and when I try to run the project directly from android studio it is running fine. But when I try to generate the bundle (release or debug) I am getting below error.
Execution failed for task ':MyDynamicFeature:bundleReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable
> Android resource linking failed
error: invalid package ID 0x7e. Must be in the range 0x7f-0xff.
Note: When I same the min_sdk version for both the module dynamic feature and base module then there is no error and the bundle is generated successfully.
My Main requirement is I need to use one library that is using min-sdk 28 but my base module is using min-sdk 21 for that reason I am using dynamic feature and set the min-sdk in dynamic feature is 28 everything is working fine except I am not able to create the bundle.
I have added my sample code at https://issuetracker.google.com/issues/273978125
Any other solution for using that library in the main application?