I've developed an administration plugin. After the installation and the activation of this plugin it isn't shown in the administration. I have to rebuild the administration with ./bin/build-administration.sh
in the command line. Afterwards the plugin is shown correctly.
How can I prevent this? The plugin should be installed and activated as normal without running any console command in the shell.
As the end user you shouldn't have to rebuild the administration after installing a plugin. You, the plugin developer, compile the assets once before you ship them with your plugin, so the end user doesn't have to compile them himself.
The pre-compiled assets will be stored in YourPlugin/src/Resources/public
. You include them when you create the archive for your plugin and/or commit them to your repository if you plan to make your plugin installable via composer.