1

I am getting the following error when trying to build a bundle.

Error: Module 'dynamicFeature' has no dex files but the attribute 'hasCode' is not set to false in the AndroidManifest.xml

I have added a dynamic feature named dynamicFeature which has a single .java file with which I want to interact with but somehow while building the bundle it doesn't seem to recognize this file and is asking me to set 'hasCode' to false. Has anyone faced a similar issue?

shubhamgarg1
  • 1,619
  • 1
  • 15
  • 20

1 Answers1

1

The problem was because proguard was trying to remove the code as it wasn't finding any uses of the Java class as this was called in the main module using reflection.

shubhamgarg1
  • 1,619
  • 1
  • 15
  • 20