If you see that the problem is related to the module of dynamic functions, make sure that it depends on the “base” module or on which module you used:
apply plugin: 'com.android.application'
as he will be responsible for creating the Android app.
When dynamic functions entered the game, the way the project was built changed. Prior to this, the application module included all library modules, but now dynamic function modules should include the application module as @ezio mentions:
fooobar.com/questions/1271162 / ...
source share