How do you run Android Studio on NixOS without errors

I recommend you to use nixpkgs for IDEs. Or at least Flatpaks.
Maybe you can try installing libpng.