0

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 added android.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 by android.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 with apply 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.

Kartik Shah
  • 143
  • 2
  • 5
  • 14
  • it'd called a plugin – Eric Sep 10 '22 at 20:54
  • I know that if you want to add any feature in Cordova, you need to add the plugin. But I am unsure how to write that plugin code or don't have any idea of any documentation or tutorial to do so; I hope I understand you correctly. if you can guide me on how to write dynamic-feature plugin in cordova, it will be very helpful. – Kartik Shah Sep 11 '22 at 07:24

0 Answers0