/etc/network/interfaces by adding these lines:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
Then try to connect to your AP/Wireless router and check the internet connection out by
ping www.google.com and if it says
host unreachable ... or get you nothing, try to set static dns server:
sudo nano /etc/dhcpcd.conf
Comment/Remove all lines and add
static domain_name_servers=22.214.171.124 and try pinging google.