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 “”

#ip route add default via // indicate the gateway, and set it by your condition.

#ip rule add from all lookup main pref 99