davidesp
davidesp

Reputation: 3972

ionic platform add android - are these necessary directories?

When I run either of the following commands:

$ ionic platform add android

or

$ ionic run android -l

the plugins on the directory:

<root>/plugins

are copied to the directory:

<root>/platforms/android/assets/www/plugins

enter image description here

Inside each plugin directory there is one JavaScript file.

In the other hand, inside the directory:

<root>/platforms/android/assets/www/build

there is one compiled javascript file: main.js

enter image description here

So, my question is if I need the following directory?

<root>/platforms/android/assets/www/plugins

In case the application doesn't need it, how can I remove it during the execution of the two first commands above?

Upvotes: 3

Views: 223

Answers (1)

David
David

Reputation: 7507

In the <root>/platforms/android/assets/www/build you find the .js files of your application (the code you create for your application). In <root>/platforms/android/assets/www/plugins you find a single folder and one or more .js files for every plugin you add to your project, these .js files are part of the bridge between the javascript part in the webview and the native (Java or ObjC) code of the plugins. So deleting them would break cordovas plugin system.

Upvotes: 1

Related Questions