You might be thinking this question is a duplicate of this one. But since then, Android Studio has been updated and the solution given there is not working anymore.
In Android 5.0 an icon always got an opaque background until I created a transparent file.
Launcher Icons (Adaptive and Legacy) in Icon Type.Image in Asset Type and select your picture inside Path field (Foreground Layer tab).ic_launcher-web.png).Background Layer tab select Image in Asset Type and load the transparent background from step 4.Legacy tab select Yes for all Generate, None for Shape.Foreground Layer and Background Layer tabs you can change trim size.Though you will see a black background behind the image in Preview window, after pressing Next, Finish and compiling an application you will see a transparent background in Android 5, Android 8.
Here is the transparent image: