There is an Ethernet App in the Android8.0 System. You can use it to set static IP.
After that, to make the static IP successfully, issue the following commands in the Terminal App, which you can find in the Android8.0 System.
$ su
#ndc resolver clearnetdns eth0 #ndc resolver setnetdns eth0 “” 8.8.8.8 4.4.4.4
#ip route add default via 192.168.6.1 //192.168.6.1 indicate the gateway, and set it by your condition.
#ip rule add from all lookup main pref 99