Questions tagged [dynamic-feature-module]
155 questions
8
votes
0 answers
Android: Importing resources on featureModule vs library module
featureModule = apply plugin: 'com.android.dynamic-feature'
libraryModule = apply plugin: 'com.android.library'
Problem - Using any library resources in feature module requires full package name qualifier which eventually creates a problem for…

user3354265
- 777
- 1
- 10
- 26
8
votes
1 answer
Android ViewBindings across dynamic features
So happenned that I have a main app module
build.gradle
dynamicFeatures = [":myFeature"]
viewBinding {
enabled = true
}
AdroidManifest.xml
package="com.mydomain.testproject"
With some common layouts which I'm using across…

Stumi
- 572
- 5
- 8
8
votes
1 answer
Android dynamic features with DataBinding and R8
I have problem with usage of DataBinding in my Dynamic Feature module.
I can't generate binding object related for my fragment when isMinifyEnabled = true
Generally I try to do it using this code:
val viewDataBinding: FragmentFeature1Binding =…

Paweł Dedio
- 1,338
- 12
- 20
7
votes
1 answer
fragmentScenario Espresso tests of Fragments in Dynamic feature modules
Has anyone figured out how to test fragments in Dynamic feature modules in isolation using fragmentScenario Espresso tests where the app's Activity is in a base module.
I have overcome several issues such as complaints about the style not being…

miguel
- 16,205
- 4
- 53
- 64
6
votes
1 answer
Merged test apk for dynamic feature modules
Is there a way to create a universal APK for instrumented tests? I wanted to run the whole test suite on Firebase Test Lab but it seems tedious to upload one APK for each dynamic feature module's test APK.
For the app, you can do a…

Kurt Acosta
- 2,407
- 2
- 14
- 29
6
votes
1 answer
Access Binding Adapters in multi module project
I've got a multi module project where the app module contains my binding adapters and my feature module depends on my app module since it is a dynamic feature module.
App (contains binding adapters) ----> Dynamic feature module (where the layout is…

Jitendra Reddy
- 106
- 6
6
votes
1 answer
java.lang.NoSuchMethodError: No static method asAttributeSet(Lt/g/a/a;)Landroid/util/AttributeSet; in class Landroid/util/Xml;
Complete error
java.lang.NoSuchMethodError: No static method asAttributeSet(Lt/g/a/a;)Landroid/util/AttributeSet; in class Landroid/util/Xml; or its super classes (declaration of 'android.util.Xml' appears in…

Sanket Vekariya
- 2,848
- 3
- 12
- 34
6
votes
1 answer
Using Internal App Sharing to test on demand dynamic feature module not working
I am trying to use internal app sharing to test that I can correctly request and download an on-demand dynamic feature module.
When I try this I can see that it first starts to download new feature correctly, but it never installs. I see these…

tir38
- 9,810
- 10
- 64
- 107
5
votes
1 answer
NullPointerException on generated binding class for dynamic feature modules when minSdkVersion is >= 26
I am trying to update my MinSdkVersion from 25 to 26, but I receive NullPointerExceptions when accessing properties of the generated binding classes.
The following snippet shows which line of code causes a NPE:
class DynamicActivity :…

Hylke
- 598
- 1
- 3
- 17
5
votes
1 answer
Instant app, Try Now button does not appear in play store
i started with following github projects but these example are not working properly. I added missing parts as stated in the…

oiyio
- 5,219
- 4
- 42
- 54
5
votes
3 answers
Android: PreviewView causes crash in dynamic feature module
I am trying to create an on-demand feature module using the androidx.camera package. I am getting a crash when the activity inflates the layout which includes the PreviewView. Note, the module loads correctly and show the correct layout if I just…

heatherrc
- 61
- 3
5
votes
2 answers
Incorrect value of app module dimen/color when using in dynamic-delivery module
I have app module and one dynamic module named - "chat". I have a layout and fragment resides in chat module, in layout there is a android:textSize="@dimen/sp20" written. Dimen is defined in app module due to that it is showing incorrect text size…

Harish Gyanani
- 1,366
- 2
- 22
- 43
5
votes
1 answer
How to use Dynamic Feature module with BottomNavigationView?
Adding dynamic feature using a navigation graph like the one below and works fine with viewPager2, or another fragment, but not with a BottomNavigationView.
Layout

Thracian
- 43,021
- 16
- 133
- 222
5
votes
2 answers
Dynamic Feature with appbundle and PROGUARD not working
OVERVIEW:
I am facing an issue while accessing the activity of the on-demand dynamic feature module from the base module due to proguard. (most probably I guess)
DESCRIPTION:
I have implemented an ON-DEMAND dynamic feature module with app bundle and…

Sanket Vekariya
- 2,848
- 3
- 12
- 34
4
votes
1 answer
How to access same usecase inside multiple feature modules
in the case of real large project, i have decided to use clean architecure inside each feature module of my application separately, preventing to have one Giant domain and data layer against too many features.
Now , I'm thinking how to do bestEffort…

HAMED
- 353
- 4
- 13