Hi Erel,
after you told me that I had obviously made a mistake, I went through everything again step by step and possibly found the mistake.
But when I wanted to test the code, the following message suddenly came up:
"The developer of this app is not recognized by Play Protect. Apps from unknown developers may not be safe."
I ignored the hint and clicked on "Install anyway".
Then came the message: "App was not installed."
I repeated the process several times, but the same message always came up.
How can I solve this problem?