I am new to android development. And I have installed eclipse, java 11 and android sdk tools in my computer. But when I try to build a project it says that to upgrad
You have the direction of fit backwards. Android supports certain versions of Java, not the other way around.
That being said, Oracle Java and Android Java aren't really the same thing - they don't even use the same virtual machine, as a matter of fact. They're being developed completely separately.
As others have indicated, recent versions of Android supports up to Java 7 and a subset of Java 8 features. Older versions of Android may support less than that.