I have a project in android and wanted to integrate the Cordova module using dynamic-feature, I am able to integrate the module in Cordova via a simple library integration, but when I did the setup for dynamic-delivery it gives me the below error
* What went wrong:
A problem occurred configuring project ':app'.
Unable to find matching projects for Dynamic Features: [:featureName]
To resolve the error, I tried to follow the library integration step with my tweak and understanding which is as below,
At first, I understand the problem that it fails to find the dynamic-feature module.
So went back to library integration
In
project.properties
I have addedandroid.library.reference.1 = libraryName
(you can assume that I have followed remaining steps to integrate library)So to remove the library from a project I have removed the code that adds a library, if I don't follow this step then Cordova automatically adds implementation code (and gives circular dependency error) in the app's Gradle and it assumes that we wanted to add a library, after following this step android no longer adds library implementation code.
Till this step, I have assumed that if I can add the library by adding code
android.library.reference
then I should be able to add the dynamic feature byandroid.dynamic-feature.reference
,I have come to the above conclusion on the basis of the observation of
build.gradle
for ex. if you want to add a library in android you modify the plugin line withapply plugin: com.android.library
.Anyway, my result is a failure and I am not able to figure out how we can add dynamic-feature in Cordova, if anyone can guide me with documentation, tutorial or small help in whatever little steps I followed will be very helpful.
P.S. I have used and integrated dynamic-feature in native android and with unity library successfully, so you can assume that I followed all steps correctly, it's just that in Cordova I am able to not bridge this integration.