CodeWorks for Android install fails on Debian Stretch

I followed https://docs.unrealengine.com/latest/INT/Platforms/Android/GettingStarted/1/index.html
until I hit

$ ./CodeWorksforAndroid-1R6u1-linux-x64.run --keep
Verifying archive integrity... All good.
Uncompressing CodeWorks for Android 100%
./Launcher: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

The version of libpng installed on Debian Stretch is 16

/usr/lib/x86_64-linux-gnu/libpng.so -> libpng16.so
/usr/lib/x86_64-linux-gnu/libpng16.so -> libpng16.so.16.28.0
/usr/lib/x86_64-linux-gnu/libpng16.so.16 -> libpng16.so.16.28.0
/usr/lib/x86_64-linux-gnu/libpng16.so.16.28.0

To fix this I downloaded libpng12 from a Ubuntu xenial (16.04LTS) mirror and installed it

sudo dpkg -i libpng12-0_1.2.46-3ubuntu4.2_amd64.deb

The Launcher program was then able to run and started downloading

It failed with
Installing Android NDK 12b failed.
Return Code: 2
exit status 1

Since I had added the --keep argument to the launcher I was able to look inside the linux-x64 directory.
In case it helps here are the contents of some files in that directory:

  • Launcher.log:
    07-10 16:50:45.7 I: 0x69 0x6e 0x73 0x74 0x61 0x6c 0x6c 0x5f 0x64 0x65 0x70 0x65 0x6e 0x64 0x65 0x6e 0x63 0x79 0x3a 0x64 0x6f 0x73 0x32 0x75 0x6e 0x69 0x78 0x0a
  • local.cfg:
    application_version=1R6

I deselected Android NDK installation to allow the install to complete.

Once installed run the NVPACK/Chooser program and select NDK install.

This now succeeds.

I added a comment to an NVidia post about a similar problem: