Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 444
davidesp Avatar asked Nov 22 '25 16:11

davidesp


1 Answers

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.

like image 141
David Avatar answered Nov 25 '25 09:11

David



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!