I tried to upgrade Debian 8 to 10 by first upgrading it to version 9 and then to 10. I did this by changing /etc/apt/sources.list, running apt-get update, apt-get upgrade and apt-get dist-upgrade. The upgrade from 8 to 9 went well without issues. Then I changed sources.list to point to the current stable repositories, and upgraded. Like previously, it upgraded with no issues, but after it completed, I found it unable to resolve hostnames for any online resource (apt update says Temporary failure resolving deb.debian.org, ping google.com says Temporary failure in name resolution). I tried adding nameserver 8.8.8.8 to /etc/resolv.conf, but that didn't fix my issue.
I would also like to point out that I am running Debian on an old Asus ME173X Android 4.2.2 (armhf) tablet with chroot in a terminal emulator.
How to fix name resolution?