0

I looked all over the internet but couldn't find a satisfactory answer. I wanted to know the exact build process that cordova uses to build an .apk file.

What is the internal process?

How does it deal with the plugin? Does it copy the plugin (js) or does it build the plugin .java file as well and packages into the .apk? The reason I'm also asking this question is when I do make changes to the .java plugin file , the build process doesn't build it. (Any compile error is not caught)?

Please can anybody shed a light or point to a resources that clarifies it?

ANewGuyInTown
  • 5,957
  • 5
  • 33
  • 45

1 Answers1

0

It sounds like you're trying to use the development workflow with a plugin, in which case you should be using --link when you add the plugin to your project. Docs

Linking accomplishes the following:

  • The entire plugin is symlinked into /plugins; however changes to your plugin's www or plugin.xml file will require an plugin rm and add.
  • The native code files are symlinked (not the entire plugin directory) in the appropriate location in platforms/. Changes to your native code files in the plugin directory or the native IDE should be reflected automatically on next build. (This does not apply to your plugin's JavaScript; this file is copied and not symlinked — you must plugin rm and add to update this.)

If you do not link your plugins during development, the following applies:

  • Plugin files are copied into plugins/ on install
  • JS & Native code is copied to the appropriate location in platforms/ on install (or platform add)
  • Changes to platforms/ will be reflected in your next build, but will not be reflected back to your original plugin.
  • Changes to your plugin will not be reflected in your next build without a plugin rm and add, because the native files aren't linked
Kerri Shotts
  • 2,372
  • 1
  • 17
  • 19