Question on installation of android-x86-8.1-r2.x86_64.rpm on Ubuntu 18.04
I determined that grub was actually configured with an option to boot Android, but I wasn't seeing this option because grub was configured to automatically boot Ubuntu. I added the # to the beginning of the following lines in /etc/default/grub, ran "sudo update-grub", and now my computer gives me the option to boot Android.

#GRUB_TIMEOUT_STYLE=hidden
#GRUB_TIMEOUT=0

I also determined the menu entry I added to 40_custom wasn't necessary as it resulted in a redundant option to boot Android in the grub boot menu, so I deleted this menu entry (which I had manually added as described in my question above) from my 40_custom file.