A friend was having trouble connecting her Mi Box (an Android 6.0 TV appliance with an impressive feature set) to her WiFi. The Mi Box could see the SSID, but whenever she connected to it and entered the password, the Mi Box responded with “WiFi password not valid.”
Long story short, the WiFi’s WPA2-PSK security was preventing the Mi Box from connecting. We temporarily disabled the security long enough for the Mi Box to connect and download an Android system update (Under About, System Update– it’s ~616 MB download to jump to Android TV 8), then disconnected/forgot the network, re-enabled the WiFi security features, and successfully re-connected the Mi Box.
Hope this helps someone else out.